Add abort_connection function to close connection with browser