close socket if peer closes