code: async def stop(self):
          
          self._shutdown = True
  
          if self.wsck:
              _LOGGER.info('Closing Emby server websocket.')
              await self.wsck.close()
              self.wsck = None
  
          if self._own_loop:
              _LOGGER.info("Shutting down Emby server loop...")
              self._event_loop.call_soon_threadsafe(self._event_loop.stop)
docs: Async method for stopping connectivity with the emby server.