LearnBoost/socket.io-client — pull request #564 by mokesmokes (2013-07-17 18:48:47+00:00)
Title: reconnection fixes

This commit fixes two issues with reconnections:
1. The reconnection delay is meaningless if the handshake is not replied. Previously, it was often the case that the socket would go into "reconnecting", but no further reconnection attempts would be made since frequently the handshake XHR would not return (most often observed with websocket connections when the server restarts). This fix provides a handshake timeout that is a bit shorter than the reconnection delay, so further reconnection attempts can actually take place. Note that this fix only affects browsers with XMLHttpRequest - i.e. Chrome, FF, IE10+, etc.
2. socket.disconnect() on the client side was not respected if called while the socket was in the `reconnecting` state. Fixed.