A
A
Alexander Wolf2013-04-23 21:47:29
JavaScript
Alexander Wolf, 2013-04-23 21:47:29

False positive disconnect in socket.io?

Hello! Suffering from false triggering of the disconnect event in socket.io.
Piece of code:

socket.on('disconnect', function () { socket.broadcast.emit('exit') });

The problem is that it fires often enough even when the browser is online...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Keenest, 2013-04-24
@mannaro

Just? Weird.
Maybe you are confusing it with moving from page to page - yes, the disconnect works there, but this is quite logical.
We clicked on the link, the disconnect worked, another page loaded, the connection worked.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question