code: def on_close(self):
          ''' Clean up when the connection is closed.
  
          '''
          log.info('WebSocket connection closed: code=%s, reason=%r', self.close_code, self.close_reason)
          if self.connection is not None:
              self.application.client_lost(self.connectionf on_close(self):
          ''' Clean up when the connection is closed.
  
          '''
          log.info('WebSocket connection closed: code=%s, reason=%r', self.close_code, self.close_reason)
          if self.connection is not None:
              self.application.client_lost(self.connection)
docs: Clean up when the connection is closed.