Close the active SMTP session if one exists.
499954
public function smtpClose()
    {
        if (null !== $this->smtp) {
            if ($this->smtp->connected()) {
                $this->smtp->quit();
                $this->smtp->close();
            }
        }
    }
842317
def close_session_log(self):
        """"""
        if self.session_log is not None and self._session_log_close:
            self.session_log.close()
            self.session_log = None
884368
def close(self, wait=True, abort=False):
        """"""
        if not self.closed and not self.closing:
            self.closing = True
            self.server._trigger_event('disconnect', self.sid, run_async=False)
            if not abort:
                self.send(packet.Packet(packet.CLOSE))
            self.closed = True
            self.queue.put(None)
            if wait:
                self.queue.join()
1185592
def close(self):
        
        # Disconnect with a fancy message, then close connection
        if self._connection is not None:
            self._connection.disconnect("Bot is quitting")
            self._connection.close()
            self._connection = None

        # Stop the client loop
        self.__stopped.set()

        if self.__thread is not None:
            try:
                self.__thread.join(5)
            except RuntimeError:
                pass
            self.__thread = None
1259451
def disconnect(self):
        
        if hasattr(self, '_lazy_sftp'):
            if self.sftp is not None:
                self.sftp.close()
            delattr(self, '_lazy_sftp')
        if hasattr(self, '_lazy_channel'):
            if self.channel is not None:
                self.channel.close()
            delattr(self, '_lazy_channel')
        if hasattr(self, '_lazy_cli'):
            if self.cli is not None:
                self.cli.close()
            delattr(self, '_lazy_cli')
        if hasattr(self, '_lazy_pbm'):
            if self.pbm is not None:
                self.pbm.close()
            delattr(self, '_lazy_pbm')
        if hasattr(self, '_lazy_rpyc'):
            if self.rpyc is not None:
                self.rpyc.close()
            delattr(self, '_lazy_rpyc')
1285464
def close(self, code=3000, message='Go away!'):
        
        if self.state != SESSION_STATE.CLOSED:
            try:
                self.conn.connectionLost()
            except Exception as e:
                log.msg("Failed to call connectionLost(): %r." % e)
            finally:
                self.state = SESSION_STATE.CLOSED
                self.close_reason = (code, message)

            # Bump stats
            self.stats.sessionClosed(self.transport_name)

            # If we have active handler, notify that session was closed
            if self.handler is not None:
                self.handler.session_closed()
355503
def close(self):
        '''
        
        '''
        if self._closed:
            return
        self._closed = True
        self._worker_thread.work_queue.put(self.aiohttp_session.close())
        self._worker_thread.work_queue.put(self.worker_thread.sentinel)
        self._worker_thread.join()
591123
public function SmtpClose() {
    if(!is_null($this->smtp)) {
      if($this->smtp->Connected()) {
        $this->smtp->Quit();
        $this->smtp->Close();
      }
    }
  }
755083
def disconnect(self):
        
        if self.connected:
            try:
                self._smtp.close()
                self._connected = False
                result = True
            except Exception:  # noqa
                self._logger.exception('Something went wrong!')
                result = False
            return result
169440
def close_session(self):
        """"""
        if not self._session.closed:
            if self._session._connector_owner:
                self._session._connector.close()
            self._session._connector = None
443487
public function disconnect()
    {
        /* If we have an SMTP object, disconnect and destroy it. */
        if (is_object($this->_smtp) && $this->_smtp->disconnect()) {
            $this->_smtp = null;
        }

        /* We are disconnected if we no longer have an SMTP object. */
        return ($this->_smtp === null);
    }
1105423
def terminate():
    
    with _sender_instances_lock:
        for sender_key, sender in _sender_instances.items():
            sender.close()
        _sender_instances.clear()
1362814
def close(self) -> None:
        """"""
        if self.session_id is not None:
            self.client.delete_session(self.session_id)
        self.client.close()
20418
def _destroy_session(self):
        
        self._session.loggedin = False
        self._session.email = None
        self._session.username = None
        self._session.realname = None
        self._session.token = None
        self._session.lti = None
1230079
async def close(self):
        
        if not self._sendHeaders:
            self._startResponse()
        if self.inputstream is not None:
            self.inputstream.close(self.connection.scheduler)
        if self.outputstream is not None:
            await self.flush(True)
        if hasattr(self, 'session') and self.session:
            self.session.unlock()
341268
def close(self):
        
        self.active = False
        self.end = utcnow()
        self._model.save()
579612
def close_session(self):
        
        with self._graph.as_default():
            self._sess.close()
            self._sess = None