Function: reset
Reset the connection.

This function should be called after a connection is disconnected
before that connection is reused.
2576
function ()
    {
        this._proto._reset();

        // SASL
        this.do_session = false;
        this.do_bind = false;

        // handler lists
        this.timedHandlers = [];
        this.handlers = [];
        this.removeTimeds = [];
        this.removeHandlers = [];
        this.addTimeds = [];
        this.addHandlers = [];
        this._authentication = {};

        this.authenticated = false;
        this.disconnecting = false;
        this.connected = false;

        this._data = [];
        this._requests = [];
        this._uniqueId = 0;
    }
419311
private void resetConnection() {
		if (reconnect) {
			closeConnectionSilently();
			statement = null;
			lostCount = batch ? batchCount : 1;
			batchCount = 0;
			reconnectTimestamp = 0;
		}
	}
899215
public void refreshConnection() throws SQLException{
		this.connection.close(); // if it's still in use, close it.
		try{
			this.connection = this.pool.obtainRawInternalConnection();
		} catch(SQLException e){
			throw markPossiblyBroken(e);
		}
	}
674040
async def reset_all(self, full=True):
        
        conn = await self.redis()

        if full:
            await conn.flushdb()
        else:
            keys = await conn.keys(self.generate_key('*'))
            await conn.delete(*keys)
476088
private Object reInitialize(Object connection, Set<String> rowKeys)
    {
        /*
         * if(!rowKeys.isEmpty()) {
         */
        connection = getConnection();
        // }
        return connection;
    }
704609
protected synchronized void reset(Connection connection,
                        ReceiveListener listener,
                        WsByteBuffer data,
                        int size,
                        int segmentType,
                        int requestNumber,
                        int priority,
                        boolean allocatedFromPool,
                        boolean partOfExchange,
                        Conversation conversation)
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "reset",
                                           new Object[]
                                           {
                                              connection,
                                              listener,
                                              data,
                                              ""+size,
                                              ""+segmentType,
                                              ""+requestNumber,
                                              ""+priority,
                                              ""+allocatedFromPool,
                                              ""+partOfExchange,
                                              conversation
                                           });

      this.connection = connection;
      this.listener = listener;
      this.data = data;
      this.size = size;
      this.segmentType = segmentType;
      this.requestNumber = requestNumber;
      this.priority = priority;
      this.allocatedFromPool = allocatedFromPool;
      this.partOfExchange = partOfExchange;
      this.conversation = conversation;
      setDispatchable(null);

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "reset");
   }
474764
def catch_conn_reset(f):
    
    try:
        import OpenSSL
        ConnectionError = OpenSSL.SSL.SysCallError
    except:
        ConnectionError = None

    def new_f(self, *args, **kwargs):
        # Only handle if pyOpenSSL is installed.
        if ConnectionError:
            try:
                return f(self, *args, **kwargs)
            except ConnectionError as e:
                log.warning("caught connection reset error: %s", e)
                self.connect()
                return f(self, *args, **kwargs)
        else:
            return f(self, *args, **kwargs)
    return new_f
701724
function(connection) {
      var t = this;
      log.info('removeConnection', 'Conn_' + connection.id);
      connection.disconnect('connection_removed');
      t.connections.remove(connection);
      t.trigger('connection:remove', connection);
    }
445002
def reset connection
    http = connection.http

    finish connection

    start http
  rescue Errno::ECONNREFUSED
    e = Error.new "connection refused: #{http.address}:#{http.port}"
    e.set_backtrace $@
    raise e
  rescue Errno::EHOSTDOWN
    e = Error.new "host down: #{http.address}:#{http.port}"
    e.set_backtrace $@
    raise e
  end
886474
@Override
    public void reset() {

        if (debugEnabled) {
            logger.debug("{} reset()", logPrefix());
        }

        if (channel != null) {
            channel.pipeline().fireUserEventTriggered(new ConnectionEvents.Reset());
        }
        cancelBufferedCommands("Reset");
    }
587771
function resetTimeout() {
    clearTimeout(convo.timeout_function);

    convo.timeout_function = setTimeout(function() {
      convo.timeout();
    }, convo.timeout_after);
  }
94150
def reset(self):
        """"""
        self.domain = \
            dns.name.Name(dns.name.from_text(socket.gethostname())[1:])
        if len(self.domain) == 0:
            self.domain = dns.name.root
        self.nameservers = []
        self.localhosts = set([
          'localhost',
          'loopback',
          '127.0.0.1',
          '0.0.0.0',
          '::1',
          'ip6-localhost',
          'ip6-loopback',
        ])
        # connected and active network interfaces
        self.interfaces = set()
        self.search = set()
        self.search_patterns = ['www.%s.com', 'www.%s.org', 'www.%s.net', ]
        self.port = 53
        self.timeout = 2.0
        self.lifetime = 30.0
        self.keyring = None
        self.keyname = None
        self.keyalgorithm = dns.tsig.default_algorithm
        self.edns = -1
        self.ednsflags = 0
        self.payload = 0
        self.cache = None
608239
void resetForRetry() {
    startTime = -1L;
    startNanos = -1L;
    latency = -1L;
    result = null;
    status = null;
    statusDetail = null;
    exception = null;
    attempt = null;
    attemptFinal = null;
    vip = null;
    serverRegion = null;
    serverZone = null;
    serverApp = null;
    serverCluster = null;
    serverAsg = null;
    serverNode = null;
    httpStatus = -1;
    requestHeaders.clear();
    responseHeaders.clear();
    remoteAddress = null;
    remotePort = -1;
    builder.delete(0, builder.length());
    inflightId = null;
  }
900514
private function cleanupConnections()
    {
        foreach (['runtime', 'generator'] as $section) {
            if (!isset($this->config[$section]['connections']) || count($this->config[$section]['connections']) === 0) {
                $this->config[$section]['connections'] = array_keys($this->config['database']['connections']);
            }

            if (!isset($this->config[$section]['defaultConnection'])) {
                //The previous `array_keys` instruction has moved the pointer to the last element of the array, so the last
                //connection is set as default, instead of the first one. To avoid this, we reset the array.
                reset($this->config['database']['connections']);
                $this->config[$section]['defaultConnection'] = key($this->config['database']['connections']);
            }

            foreach ($this->config[$section]['connections'] as $connection) {
                if (!array_key_exists($connection, $this->config['database']['connections'])) {
                    throw new InvalidConfigurationException("`$connection` isn't a valid configured connection (Section: propel.$section.connections). ".
                        "Please, check your configured connections in `propel.database.connections` section of your configuration file.");
                }
            }

            if (!array_key_exists($defaultConnection = $this->config[$section]['defaultConnection'], $this->config['database']['connections'])) {
                throw new InvalidConfigurationException("`$defaultConnection` isn't a valid configured connection (Section: propel.$section.defaultConnection). ".
                    "Please, check your configured connections in `propel.database.connections` section of your configuration file.");
            }
        }
    }
854209
def reset
      self.user_agent         = DEFAULT_USER_AGENT
      self.api_version        = DEFAULT_API_VERSION
      self.server_url         = DEFAULT_SERVER_URL
      self.client_name        = DEFAULT_CLIENT_NAME
      self.client_key         = DEFAULT_CLIENT_KEY
      self.connection_options = DEFAULT_CONNECTION_OPTIONS
      self.middleware         = DEFAULT_MIDDLEWARE
      self
    end
666946
public function reset()
    {
        $this->timer              = 0;
        $this->counter            = 0;
        $this->counterConnections = 0;
        $this->queries            = array();
        $this->connections        = array();
    }
735133
function reset()
    {
        $this->connection->query(sprintf("DELETE FROM %s",
                                         $this->associations_table_name));

        $this->connection->query(sprintf("DELETE FROM %s",
                                         $this->nonces_table_name));
    }