handle remote host closing connection unexpectedly