Automattic/socket.io-client — pull request #782 by davidbau (2014-11-12 01:36:17+00:00)
Title: Fix socket.io issue #1862

See https://github.com/Automattic/socket.io/issues/1862 for the repro
case. Basically, if connecting to one namespace at the same time
as disconnecting from another, the connection gets lost. We should
keep the connection alive as long as anybody is "connecting".

This code shrinks the code slightly and fixes this bug.