Automattic/engine.io-client — pull request #351 by nkzawa (2014-10-04 13:23:57+00:00)
Title: wait for buffer to be drained before closing

When a socket sends packets and closes while upgrading a transport, those packets remain to be treated.
I changed to wait the drain event before actual closing on that situation. Sorry for the delay.

related issues: https://github.com/Automattic/engine.io/issues/284 https://github.com/Automattic/engine.io-client/pull/324