close connection if nread is < 0