Closed KMahoney closed 10 years ago
This is quite difficult to reproduce, but I've managed to do so in both Chrome and Firefox running on a Mac.
Server:
{-# LANGUAGE OverloadedStrings #-} import Web.SocketIO main = server 4000 $ do on "ping" $ emit "pong" []
Client:
<script src="socket.io.js"></script> <script> var socket = io.connect('http://localhost:4000'); socket.on('pong', function (data) { console.log("pong!!!"); }); socket.emit('ping'); </script>
Waiting for
[debug] 63065498561054461841 Polling [debug] 63065498561054461841 Clear Timeout [debug] 63065498561054461841 Set Timeout
then typing socket.emit('ping') into the javascript console will not respond with a 'pong' the first time, but will the second time.
socket.emit('ping')
I couldn't reproduce this on master
master
This is quite difficult to reproduce, but I've managed to do so in both Chrome and Firefox running on a Mac.
Server:
Client:
Waiting for
then typing
socket.emit('ping')
into the javascript console will not respond with a 'pong' the first time, but will the second time.