Prevent crush in socketError during handshake
Merge pull request #2 from kdkdkd/master

Issue #2: Prevent crush in socketError during handshake