Skip to content

Commit d701d02

Browse files
Chuan Mamichael-grunder
authored andcommitted
Fix phpredis#562: do not send QUIT command in redis_sock_disconnect()
1 parent 0036a73 commit d701d02

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

library.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1489,13 +1489,9 @@ PHP_REDIS_API int redis_sock_disconnect(RedisSock *redis_sock TSRMLS_DC)
14891489

14901490
redis_sock->dbNumber = 0;
14911491
if (redis_sock->stream != NULL) {
1492-
if (!redis_sock->persistent) {
1493-
redis_sock_write(redis_sock, "QUIT" _NL, sizeof("QUIT" _NL) - 1 TSRMLS_CC);
1494-
}
1495-
14961492
redis_sock->status = REDIS_SOCK_STATUS_DISCONNECTED;
14971493
redis_sock->watching = 0;
1498-
if(redis_sock->stream && !redis_sock->persistent) { /* still valid after the write? */
1494+
if(!redis_sock->persistent) {
14991495
php_stream_close(redis_sock->stream);
15001496
}
15011497
redis_sock->stream = NULL;

0 commit comments

Comments
 (0)