invisibleroads / invisibleroads/socketIO-client
disconnect() doesn't actually disconnect the socket immediately
- Dominant language
- Python
- Stars
- 441
- Forks
- 204
- PR merge metrics
- No merged PRs in 30d
Description
Forgive me if I'm wrong, but it seems that calling disconnect() doesn't have an effect until 90 seconds later:
Client side (python):
```
>>> from socketIO_client import SocketIO, LoggingNamespace
>>> sio = SocketIO('localhost', 5080, LoggingNamespace)
>>> sio.disconnect()
```
(disconnect is called within a few seconds of creating the socket)
Server side (node.js):
```
[2017-02-10T20:05:05.392Z] -> New connection, id YLduS84m1_5QrV8jAAAC
[2017-02-10T20:06:35.670Z] -> Socket YLduS84m1_5QrV8jAAAC disconnected
```
(Note the timestamps.)
Is this intended behavior? I have a loop implemented in Python to check the health of a node-based socket.io service; it creates a socket, asks for heartbeat, then closes it. However, if the socket doesn't actually close in a timely manner, then the process runs out of file handles (`[Errno 24] Too many open files`).
I noticed that there's another open ticket for auto-reconnect; if that gets implemented, then I suppose I won't need to be creating a new socket each iteration of the loop.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.