projects
/
platform
/
upstream
/
libwebsockets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d3b83e
)
ping test app: avoid FPE when no packets received
author
Andy Green
<andy@warmcat.com>
Fri, 4 Aug 2017 05:29:20 +0000
(13:29 +0800)
committer
Andy Green
<andy@warmcat.com>
Fri, 4 Aug 2017 05:29:20 +0000
(13:29 +0800)
test-server/test-ping.c
patch
|
blob
|
history
diff --git
a/test-server/test-ping.c
b/test-server/test-ping.c
index
f0f00d3
..
3917781
100644
(file)
--- a/
test-server/test-ping.c
+++ b/
test-server/test-ping.c
@@
-536,7
+536,8
@@
int main(int argc, char **argv)
/* stats */
- fprintf(stderr, "\n--- %s websocket ping statistics "
+ if (global_rx_count && global_tx_count)
+ fprintf(stderr, "\n--- %s websocket ping statistics "
"using %d connections ---\n"
"%lu packets transmitted, %lu received, "
"%lu%% packet loss, time %ldms\n"