code: def closed(self, error=None):
          
  
          if self._application:
              try:
                  self._application.closed(error)
              except Exception:
                  # Ignore exceptions from the notification
                  pass
docs: Notify the application that the connection has been closed.
  
          :param error: The exception which has caused the connection to
                        be closed.  If the connection has been closed
                        due to an EOF, pass ``None``.