code: async def _remote_close(self, exc=None):
          
          if self.state in (STATE_CLOSING, STATE_CLOSED):
              return
  
          log.info("close session: %s", self.id)
          self.state = STATE_CLOSING
          if exc is not None:
              self.exception = exc
              self.interrupted = True
          try:
              await self.handler(SockjsMessage(MSG_CLOSE, exc), self)
          except Exception:
              log.exception("Exception in close handler.")
docs: close session from remote.