invisibleroads / invisibleroads/socketIO-client

polling and websocket transports do not close connections

Open
#176 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
441
Forks
204
PR merge metrics
No merged PRs in 30d

Description

Every `SocketIO` session causes two connections to be created, one for the initial `XHR_PollingTransport` and one for the `WebsocketTransport`.

When the upgrade from polling to websocket happens, the TCP connection for the polling transport is not closed, resulting in a resource leak.

Additionally, calling `disconnect()` on the `SocketIO` instance leaves the websocket transport's connection in a `CLOSE_WAIT` state.

This issue can be seen by adding
```
class Test_ZZZSleepy(TestCase):
def test_zzzsleep(self):
time.sleep(400)
self.assertTrue(True)
```
to the tests, and then running `netstat -antp | grep 9000` towards the end of the sleep. 20 connections get left in the `CLOSE_WAIT` state.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.