handle ECONNRESET in streams