fixed ECONNRESET error

fixed ECONNRESET error
Merge pull request #15 from Se7enSky/master

handle ECONNRESET client socket error, so client apps don't crashes