LearnBoost / websocket.io

329 stars 59 forks source link

Handle socket "timeout" event #25

Closed nicokaiser closed 12 years ago

nicokaiser commented 12 years ago

In some cases, a socket throws the "timeout" event (even though setTimeout(0) prevents timeouts). This should be handled by the server.

I don't know if "self.destroy()" is the right way to handle it, because I have seen timeouts on connections that were not "open" (so nothing is emitted to the application). Don't know if this could lead to socket leakage.

rauchg commented 12 years ago

If anything, this might fix the leaks.