Closed
Description
This server calls s.server.close()
1 second after a client connects.
io = require 'socket.io'
s = io.listen 4321
s.sockets.on 'connection', (socket) ->
setTimeout (-> s.server.close()), 1000
... however, the client is never disconnected:
$ coffee server.coffee
info - socket.io started
debug - client authorized
info - handshake authorized 4096240811453695407
debug - setting request GET /socket.io/1/websocket/4096240811453695407
debug - set heartbeat interval for client 4096240811453695407
debug - client authorized for
debug - websocket writing 1::
new connection
client connected. Server will close in 1 second...
debug - emitting heartbeat for client 4096240811453695407
debug - websocket writing 2::
debug - set heartbeat timeout for client 4096240811453695407
debug - websocket received data packet 2::
debug - got heartbeat packet
debug - cleared heartbeat timeout for client 4096240811453695407
debug - set heartbeat interval for client 4096240811453695407
debug - emitting heartbeat for client 4096240811453695407
debug - websocket writing 2::
debug - set heartbeat timeout for client 4096240811453695407
debug - websocket received data packet 2::
debug - got heartbeat packet
debug - cleared heartbeat timeout for client 4096240811453695407
debug - set heartbeat interval for client 4096240811453695407
debug - emitting heartbeat for client 4096240811453695407
debug - websocket writing 2::
....etc