proper handling of remote_address and closing of the client