stop tcp read on error condition