Commit 04b9ccca authored by Sergey Lyubka's avatar Sergey Lyubka

Testing server PINGs

parent 1a171652
...@@ -24,9 +24,10 @@ ...@@ -24,9 +24,10 @@
out('DISCONNECTED'); out('DISCONNECTED');
}; };
websocket.onmessage = function(ev) { websocket.onmessage = function(ev) {
if (!ev.data) return; // No data, this is a PING message, ignore it
out('<span style="color: blue;">RESPONSE: ' + ev.data + ' </span>'); out('<span style="color: blue;">RESPONSE: ' + ev.data + ' </span>');
num_messages++; num_messages++;
if (num_messages > 3) { if (num_messages > 100) {
websocket.send('exit'); websocket.send('exit');
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment