Close the socket immediately when get the server's error response

When send some messages with invalid token,the invalde token will lead to the left messsage send failure.
This fork had fix the bug now .
Note:
The "50901fb" is good version.
And the test case, you can find here : https://gist.github.com/yongboy/9635763