Handle closed connection.