mirror of
https://github.com/php-win-ext/phpredis.git
synced 2026-04-29 19:53:29 +02:00
Remove REDIS_SOCK_STATUS_UNKNOWN because no way to reach it.
This commit is contained in:
@@ -386,8 +386,7 @@ typedef size_t strlen_t;
|
||||
|
||||
#define REDIS_SOCK_STATUS_FAILED 0
|
||||
#define REDIS_SOCK_STATUS_DISCONNECTED 1
|
||||
#define REDIS_SOCK_STATUS_UNKNOWN 2
|
||||
#define REDIS_SOCK_STATUS_CONNECTED 3
|
||||
#define REDIS_SOCK_STATUS_CONNECTED 2
|
||||
|
||||
#define _NL "\r\n"
|
||||
|
||||
|
||||
@@ -1640,15 +1640,6 @@ redis_sock_server_open(RedisSock *redis_sock, int force_connect TSRMLS_DC)
|
||||
case REDIS_SOCK_STATUS_CONNECTED:
|
||||
res = 0;
|
||||
break;
|
||||
case REDIS_SOCK_STATUS_UNKNOWN:
|
||||
if (force_connect > 0 && redis_sock_connect(redis_sock TSRMLS_CC) < 0) {
|
||||
res = -1;
|
||||
} else {
|
||||
res = 0;
|
||||
|
||||
redis_sock->status = REDIS_SOCK_STATUS_CONNECTED;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return res;
|
||||
|
||||
Reference in New Issue
Block a user