Handle tcp_error so that the client won't crash and will attempt reconnect
Merge pull request #34 from talko/master

Handle tcp_error