Public: Disconnect from the kestrel server.

 Returns true
490936
def quit
      resp = send_recv( KJess::Request::Quit.new )
      return KJess::Response::Eof === resp
    end
1252347
def on_disconnect(client):
    
    print "-- Lost connection to %s" % client.addrport()
    CLIENT_LIST.remove(client)
    broadcast('%s leaves the conversation.\n' % client.addrport() )
1045531
async def disconnect(self, *, force=False):
        
        if not force and not self.is_connected():
            return

        self.stop()
        self._connected.clear()

        try:
            if self.ws:
                await self.ws.close()

            await self.terminate_handshake(remove=True)
        finally:
            if self.socket:
                self.socket.close()
622204
def disconnect(self):
        
        if self.sascfg.mode != 'IOM':
            res = "This method is only available with the IOM access method"
        else:
            res = self._io.disconnect()
        return res
159714
public function Disconnect( )
		{
			$this->Connected = false;
			$this->Challenge = 0;
			
			$this->Socket->Close( );
			
			if( $this->Rcon )
			{
				$this->Rcon->Close( );
				
				$this->Rcon = null;
			}
		}
170695
async def disconnect(self):
        

        async with self._disconnect_lock:
            if self._state == ConnectionState.DISCONNECTED:
                return

            self._set_state(ConnectionState.DISCONNECTING)

            logger.info('%s Disconnecting...', self.fingerprint)
            if self._reconnect_task:
                self._reconnect_task.cancel()
                self._reconnect_task = None

            if self._ping_task and not self._ping_task.done():
                self._ping_task.cancel()
                self._ping_task = None

            self._db = _DbMock()
            if self._transport:
                self._disconnect_waiter = _create_future(self._loop)
                self._transport.close()
                self._transport = None
                self._protocol = None

                await self._disconnect_waiter
                self._disconnect_waiter = None
                self._set_state(ConnectionState.DISCONNECTED)
            else:
                self._transport = None
                self._protocol = None
                self._disconnect_waiter = None
                self._set_state(ConnectionState.DISCONNECTED)
538781
def _disconnect(self):
        """"""
        if not self.protocol or not self.protocol.transport:
            self.protocol = None  # Make sure protocol is None
            return
        _LOGGER.info('Disconnecting from gateway')
        self.protocol.transport.close()
        self.protocol = None
824936
def disconnect(self):
        

        if self.connection_receive:
            self.connection_receive.close()
        if self.connection_respond:
            self.connection_respond.close()
        if self.connection_send:
            self.connection_send.close()
292347
public void disconnect() {
        reconnect = false;
        websocket.get().sendClose(WebSocketCloseReason.DISCONNECT.getNumericCloseCode());
        // cancel heartbeat timer if within one minute no disconnect event was dispatched
        api.getThreadPool().getDaemonScheduler().schedule(() -> heartbeatTimer.updateAndGet(future -> {
            if (future != null) {
                future.cancel(false);
            }
            return null;
        }), 1, TimeUnit.MINUTES);
    }
1366806
def disconnect(self):
      

      if not self.sascfg.reconnect:
         return "Disconnecting and then reconnecting to this workspaceserver has been disabled. Did not disconnect"

      pgm = b'\n'+b'tom says EOL=DISCONNECT                      \n'
      self.stdin[0].send(pgm)

      while True:
         try:
            log = self.stderr[0].recv(4096).decode(errors='replace')
         except (BlockingIOError):
            log = b''

         if len(log) > 0:
            if log.count("DISCONNECT") >= 1:
               break

      return log.rstrip("DISCONNECT")
269549
public function disconnect()
    {
        Debug::Log(Debug::INFO, 'disconnect()');

        $this->simpleCommand(Message::DISCONNECT);

        /*
         After sending a DISCONNECT Packet the Client:
         MUST close the Network Connection [MQTT-3.14.4-1].
         MUST NOT send any more Control Packets on that Network Connection [MQTT-3.14.4-2].
         */
        $this->socket->close();
        $this->call_handler('disconnect', array($this));

        return true;
    }
1197990
def disconnect(self):
        
        if not self.is_connected() and not self.is_connecting():
            return
        LOG.debug("disconnecting from %s...", self._redis_server())
        self.__periodic_callback.stop()
        try:
            self._ioloop.remove_handler(self.__socket_fileno)
            self._listened_events = 0
        except Exception:
            pass
        self.__socket_fileno = -1
        try:
            self.__socket.close()
        except Exception:
            pass
        self._state.set_disconnected()
        self._close_callback()
        LOG.debug("disconnected from %s", self._redis_server())
564509
def disconnect(self, message=""):
        
        try:
            del self.connected
        except AttributeError:
            return

        self.quit(message)

        try:
            self.socket.shutdown(socket.SHUT_WR)
            self.socket.close()
        except socket.error:
            pass
        del self.socket
        self._handle_event(Event("disconnect", self.server, "", [message]))
1189548
def disconnect
      begin
        begin
          # try to call SSL::SSLSocket#io.
          @sock.io.shutdown
        rescue NoMethodError
          # @sock is not an SSL::SSLSocket.
          @sock.shutdown
        end
      rescue Errno::ENOTCONN
        # ignore `Errno::ENOTCONN: Socket is not connected' on some platforms.
      rescue Exception => e
        @receiver_thread.raise(e)
      end
      @receiver_thread.join
      synchronize do
        unless @sock.closed?
          @sock.close
        end
      end
      raise e if e
    end
1274345
def disconnect(self, device):
        """"""
        # self.device.ctrl.sendcontrol(']')
        # self.device.ctrl.sendline('quit')
        self.log("TELNET disconnect")
        try:
            self.device.ctrl.send(chr(4))
        except OSError:
            self.log("Protocol already disconnected")
1125242
@Override
  public synchronized void disconnect() {
    try {
      // If there is an error with the handler, dont bother logging out.
      if (!mailClientHandler.isHalted()) {
        if (mailClientHandler.idleRequested.get()) {
          log.warn("Disconnect called while IDLE, leaving idle and logging out.");
          done();
        }

        // Log out of the IMAP Server.
        channel.write(". logout\n");
      }

      currentFolder = null;
    } catch (Exception e) {
      // swallow any exceptions.
    } finally {
      // Shut down all channels and exit (leave threadpools as is--for reconnects).
      // The Netty channel close listener will fire a disconnect event to our client,
      // automatically. See connect() for details.
      try {
        channel.close().awaitUninterruptibly(config.getTimeout(), TimeUnit.MILLISECONDS);
      } catch (Exception e) {
        // swallow any exceptions.
      } finally {
        mailClientHandler.idleAcknowledged.set(false);
        mailClientHandler.disconnected();
        if (disconnectListener != null)
          disconnectListener.disconnected();
      }
    }
  }
1208575
def disconnect(self):
        """"""
        self.chain.connection.log("Disconnecting: {}".format(self))
        if self.connected:
            if self.protocol:
                if self.is_console:
                    while self.mode != 'global':
                        try:
                            self.send('exit', timeout=10)
                        except CommandTimeoutError:
                            break

                self.protocol.disconnect(self.driver)
                self.protocol = None

            self.connected = False
            self.ctrl = None