Skip to content

Commit 634e016

Browse files
committed
Prefix persistent id with "phpredis:" to prevent collision with other sockets
1 parent c561e89 commit 634e016

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -816,9 +816,9 @@ PHPAPI int redis_sock_connect(RedisSock *redis_sock TSRMLS_DC)
816816

817817
if (redis_sock->persistent) {
818818
if (redis_sock->persistent_id) {
819-
spprintf(&persistent_id, 0, "%s:%s", host, redis_sock->persistent_id);
819+
spprintf(&persistent_id, 0, "phpredis:%s:%s", host, redis_sock->persistent_id);
820820
} else {
821-
spprintf(&persistent_id, 0, "%s:%f", host, redis_sock->timeout);
821+
spprintf(&persistent_id, 0, "phpredis:%s:%f", host, redis_sock->timeout);
822822
}
823823
}
824824

0 commit comments

Comments
 (0)