mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
ping test app: avoid FPE when no packets received
This commit is contained in:
parent
16ef37ef5d
commit
040b408029
1 changed files with 2 additions and 1 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue