Predis\Connection\ConnectionInterface::disconnect PHP Method

disconnect() public method

Closes the connection to Redis.
public disconnect ( )
    public function disconnect();

Usage Example

コード例 #1
0
 /**
  * Handles -ERR responses returned by Redis.
  *
  * @param ConnectionInterface $connection The connection that returned the error.
  * @param ResponseErrorInterface $response The error response instance.
  */
 protected function onResponseError(ConnectionInterface $connection, ResponseErrorInterface $response)
 {
     // Force disconnection to prevent protocol desynchronization.
     $connection->disconnect();
     $message = $response->getMessage();
     throw new ServerException($message);
 }
All Usage Examples Of Predis\Connection\ConnectionInterface::disconnect