Reconnect to the DataSift stream

@return void
3721
private function reconnect()
    {
        $auto = $this->_auto_reconnect;
        $this->disconnect();
        $this->auto_reconnect = $auto;
        $this->connect();
    }
1110678
private function connect()
    {
        $this->conn = parent::getConn();
        $this->read = $this->conn->prepare($this->sql);
        $this->read->setFetchMode(\PDO::FETCH_ASSOC);
    }
530786
function doReconnect() {
    //
    // Cleanup and recreate the socket associated
    // with this instance.
    //
    self.retry.waiting = true;
    self.socket.removeAllListeners();
    self.socket = common.createSocket(self._options);

    //
    // Cleanup reconnect logic once the socket connects
    //
    self.socket.once('connect', function () {
      self.retry.waiting = false;
      self.retry.retries = 0;
    });

    //
    // Attempt to reconnect the socket
    //
    self._setup();
    self.connect();
  }
1054913
def reconnect(self):
        '''
        '''
        if self._connection.closed():
            self._connection.reset()

            yield from self._connection.connect()
829384
public void reConnect() throws IOException {
	try {
	    if (client != null && client.isConnected()) client.disconnect();
	}
	catch (IOException ioe) {}
	connect();
    }
1180652
protected function _connect()
    {
        /**
         * if we already have a PDO object, no need to re-connect.
         */
        if ($this->_connection) {
            return;
        }

        parent::_connect();

        $retval = $this->_connection->exec('PRAGMA full_column_names=0');
        if ($retval === false) {
            $error = $this->_connection->errorInfo();
            /** @see Zend_Db_Adapter_Exception */
            // require_once 'Zend/Db/Adapter/Exception.php';
            throw new Zend_Db_Adapter_Exception($error[2]);
        }

        $retval = $this->_connection->exec('PRAGMA short_column_names=1');
        if ($retval === false) {
            $error = $this->_connection->errorInfo();
            /** @see Zend_Db_Adapter_Exception */
            // require_once 'Zend/Db/Adapter/Exception.php';
            throw new Zend_Db_Adapter_Exception($error[2]);
        }
    }
565485
public function reconnect($name)
    {
        if (isset($this->connections[$name])) {
            $this->disconnect($name);
            $this->usePdo($name);
        }
    }
1134023
public function stream()
    {
        $key = $this->data['key'];
        unset($this->data['key']);
        $path = $this->getPath() . '/' . $key;
        if (!array_key_exists('end', $this->data)) {
            $patch = $this->jsonPatch->generate($path, JsonPatch::ACTION_ADD, $this->data, false);
        } else {
            $patch = $this->jsonPatch->generate($path . '/end', JsonPatch::ACTION_ADD, $this->data['end'], false);
        }

        $this->dataSource->save($this->process, [$patch]);
        $this->data = [];
    }
249665
public function rewind()
    {
        $this->index = 0;
        $this->length = null;
        $this->end = false;

        $this->iterator->rewind();

        // Prefetch the next element
        if ($this->iterator->valid()) {
            $this->validOnNext = true;
            $this->prefetch();
        } else {
            $this->validOnNext = false;
        }

        if ($this->uses_groups) {
            // Notify the grouping helper of the change
            $this->groups->reset();
        }
    }
494473
protected function reconnect_db() {
		
		if(is_object($this->db)) {
			$dsn = $this->db->get_dsn();
			$user = $this->db->get_username();
			$pass = $this->db->get_password();
			
			$this->db->reconnect($dsn, $user, $pass);
			$this->dbConnected = $this->db->is_connected();
		}
		else {
			throw new LogicException(__METHOD__ .": database object not found");
		}
		
		return $this->dbConnected;
	}
479215
protected function checkConnection($reconnect = false)
        {
            if(empty($this->_lnk)) {
                $this->log('CheckConnection: link is not valid');
                if($reconnect) {
                    $this->log('CheckConnection: try to reconnect');
                    $this->_lnk = @odbc_connect('Driver=' . VERTICA_DRIVER . ';Servername=' . VERTICA_SERVER . ';Database='.VERTICA_DATABASE, VERTICA_USER_ETL, VERTICA_PASS_ETL);
                    if(!$this->_lnk) {
                        $this->log('CheckConnection: reconnect failed');
                        throw new Exception('Connection failed or gone away and can\'t reconnect - '.odbc_errormsg($this->_link), self::CONNECTION_FAILED);
                    }
                    $this->log('CheckConnection: reconnected!');
                    return;
                }
                throw new Exception('Connection failed or gone away - ' . odbc_errormsg($this->_link), self::CONNECTION_FAILED);
            }
        }
379752
public function reconnect($client = null)
    {
        $this->waitConnectNum ++;
        if ($client == null) {
            $client = new \swoole_mysql();
            $client->genTime = time();
        }
        $set = $this->config['mysql'][$this->active];
        $client->connect($set, function ($client, $result) use ($set) {
            $this->waitConnectNum --;
            if (! $result) {
                getInstance()->log->error($client->connect_error . ' with Mysql ' . $set['host'] . ':' . $set['port']);
            } else {
                $client->isClose = false;
                if (! isset($client->client_id)) {
                    $client->client_id = $this->establishedConn;
                    $this->establishedConn ++;
                }
                $this->pushToPool($client);
            }
        });
        $client->on('Close', [
            $this,
            'onClose'
        ]);
    }
1322103
public function doReconnect() {
		if(!$this->is_server) {
			$this->log->log("Reconnecting ($this->reconnectTimeout)...",  Net_XMPP_XMPPHP_Log::LEVEL_WARNING);
			$this->connect($this->reconnectTimeout, false, false);
			$this->reset();
			$this->event('reconnect');
		}
	}
1212884
public function connect() {
		if (URequest::isPost ()) {
			if ($connected = $this->_connect ()) {
				if (isset ( $_POST ["ck-remember"] )) {
					$this->rememberMe ( $connected );
				}
				if (USession::exists ( $this->_attemptsSessionKey )) {
					USession::delete ( $this->_attemptsSessionKey );
				}
				$this->onConnect ( $connected );
			} else {
				$this->onBadCreditentials ();
			}
		}
	}
1210491
def _reconnect(self):
        """"""
        log.debug("Reconnecting to JLigier...")
        self._disconnect()
        self._connect()
        self._update_subscriptions()
723907
def reconnect(self, exc=None):
        """"""
        # Reset protocol binding before starting reconnect
        self.protocol = None

        if not self.closing:
            log.warning('disconnected from Rflink, reconnecting')
            self.loop.create_task(self.connect())
204232
public function connect()
    {
        if ($this->connected === true) {
            return;
        }
        if ($this->_contextOption) {
            $context = stream_context_create($this->_contextOption);
            $this->_socket = stream_socket_client("udp://{$this->_remoteAddress}", $errno, $errmsg,
                30, STREAM_CLIENT_CONNECT, $context);
        } else {
            $this->_socket = stream_socket_client("udp://{$this->_remoteAddress}", $errno, $errmsg);
        }

        if (!$this->_socket) {
            Worker::safeEcho(new \Exception($errmsg));
            return;
        }
        
        stream_set_blocking($this->_socket, false);
        
        if ($this->onMessage) {
            Worker::$globalEvent->add($this->_socket, EventInterface::EV_READ, array($this, 'baseRead'));
        }
        $this->connected = true;
        // Try to emit onConnect callback.
        if ($this->onConnect) {
            try {
                call_user_func($this->onConnect, $this);
            } catch (\Exception $e) {
                Worker::log($e);
                exit(250);
            } catch (\Error $e) {
                Worker::log($e);
                exit(250);
            }
        }
    }