treat connection read error as connection being closed
Merge pull request #124 from krzcho/patch-1

treat connection read error as connection being closed