Reconnects to the controller if we have been previously disconnected.
5869
def _maybe_reconnect(self):
    """"""
    with self._lock:
      if not self._connected: 
        _LOGGER.info("Connecting")
        self._do_login_locked()
        self._connected = True
        self._connect_cond.notify_all()
        _LOGGER.info("Connected")
840709
async def reconnect(self):
        """"""
        _LOGGER.debug('starting Connection.reconnect')
        await self._connect()
        while self._closed:
            await self._retry_connection()
        _LOGGER.debug('ending Connection.reconnect')
1276434
def _on_server_disconnect(self, exception):
        """"""
        self._protocol = None
        if self._on_disconnect_callback_func and callable(self._on_disconnect_callback_func):
            self._on_disconnect_callback_func(exception)
        if self._reconnect:
            self._reconnect_cb()
799491
private void reconnect() {
        if(uploadInProgress()) {
            setState(OADState.RECONNECTING);
            BeanManager.getInstance().startDiscovery();
            Log.i(TAG, "Waiting for device to reconnect...");
        }
    }
575250
def reconnect(self, query = None, log_reconnect = False):
        
        uri = list(urisup.uri_help_split(self.sqluri))
        if uri[1]:
            authority   = list(uri[1])
            if authority[1]:
                authority[1] = None
            uri[1]      = authority

        if log_reconnect:
            LOG.warning('reconnecting to %r database (query: %r)', urisup.uri_help_unsplit(uri), query)
        self.__connect()
956610
def disconnect(self):
        """"""
        if self._connected:
            self._connected = False
            self._conn.disconnect()
276891
def disconnect(self):
        """"""

        if not self.connected:
            raise HardwareError("Cannot disconnect when we are not connected")

        # Close the streaming and tracing interfaces when we disconnect
        self._reports = None
        self._traces = None

        self._loop.run_coroutine(self.adapter.disconnect(0))
        self.connected = False
        self.connection_interrupted = False
        self.connection_string = None
951698
def reconnect_all(self):
        
        for role in self.Instances.keys():
            for connection in self.Instances[role]:
                connection.reconnect()
1130137
public void reconnect() throws SQLException {
    try {
      listener.reconnect();
    } catch (SQLException e) {
      ExceptionMapper.throwException(e, null, null);
    }
  }
836301
protected function reconnect()
    {
        if ($this->connection->inTransaction()) {
            // It is not safe to blindly reconnect in the middle of a transaction
            return false;
        }

        try {
            // Make sure we free any resources associated with the old connection
            $this->connection->disconnect();
        } catch (Exception $e) {
        }

        try {
            $this->connection->connect();
            $this->connection->log('[RECONNECT]');

            return true;
        } catch (Exception $e) {
            // If there was an error connecting again, don't report it back,
            // let the retry handler do it.
            return false;
        }
    }
270958
def reconnect(self):
        """"""
        import pika
        import pika.exceptions

        self.connection = pika.BlockingConnection(pika.URLParameters(self.amqp_url))
        self.channel = self.connection.channel()
        try:
            self.channel.queue_declare(self.name)
        except pika.exceptions.ChannelClosed:
            self.connection = pika.BlockingConnection(pika.URLParameters(self.amqp_url))
            self.channel = self.connection.channel()
397488
def _reconnect(self):
        
        if self.idle or self.closed:
            LOGGER.debug('Attempting RabbitMQ reconnect in %s seconds',
                         self.reconnect_delay)
            self.io_loop.call_later(self.reconnect_delay, self.connect)
            return
        LOGGER.warning('Reconnect called while %s', self.state_description)
275153
def clientdisconnect(self, event):
        

        try:
            if event.clientuuid == self.remote_controller:
                self.log("Remote controller disconnected!", lvl=critical)
                self.remote_controller = None
        except Exception as e:
            self.log("Strange thing while client disconnected", e, type(e))
1267887
protected void reconnect() {
		disconnect().then(ok -> {
			logger.info("Trying to reconnect...");
			scheduler.schedule(this::connect, 5, TimeUnit.SECONDS);
		}).catchError(cause -> {
			logger.warn("Unable to disconnect from Redis server!", cause);
			scheduler.schedule(this::connect, 5, TimeUnit.SECONDS);
		});
	}
208916
def on_disconnect(self):
        ""
        if self._sock is not None:
            self._sock.close()
            self._sock = None
        if self._buffer is not None:
            self._buffer.close()
            self._buffer = None
        self.encoding = None
329660
def disconnected(self, client):
        """"""
        if client not in self.clients:
            # already disconnected.
            return
        self.clients.remove(client)
        self._log_disconnected(client)
        self._close(client)
904299
def _reconnect_cb(self):
        """"""
        @asyncio.coroutine
        def try_reconnect():
            """Actual coroutine ro try to reconnect or reschedule."""
            try:
                yield from self._do_connect()
            except IOError:
                self._loop.call_later(SERVER_RECONNECT_DELAY,
                                      self._reconnect_cb)
        asyncio.ensure_future(try_reconnect())