Skip to content

Commit b3a6414

Browse files
Merge branch 'feature/matmol_connect_ex' into develop
2 parents bab2a19 + 77b17e5 commit b3a6414

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

redis.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -632,15 +632,14 @@ PHPAPI int redis_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) {
632632
}
633633

634634
/* if there is a redis sock already we have to remove it from the list */
635-
if (redis_sock_get(object, &redis_sock TSRMLS_CC, 0) > 0) {
635+
if (redis_sock_get(object, &redis_sock TSRMLS_CC, 1) > 0) {
636636
if (zend_hash_find(Z_OBJPROP_P(object), "socket",
637-
sizeof("socket"), (void **) &socket) == FAILURE) {
637+
sizeof("socket"), (void **) &socket) == FAILURE)
638+
{
638639
/* maybe there is a socket but the id isn't known.. what to do? */
639640
} else {
640641
zend_list_delete(Z_LVAL_PP(socket)); /* the refcount should be decreased and the detructor called */
641642
}
642-
} else {
643-
zend_clear_exception(TSRMLS_C); /* clear exception triggered by non-existent socket during connect(). */
644643
}
645644

646645
redis_sock = redis_sock_create(host, host_len, port, timeout, persistent, persistent_id, retry_interval);

0 commit comments

Comments
 (0)