Permalink
Browse files

php_memcached_session.c added connect timeout

  • Loading branch information...
1 parent 0d1ff23 commit 07879fb6a99b32d473cbda9122c75e128c2c1a29 @xoJIog committed Nov 20, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 php_memcached_session.c
View
@@ -234,6 +234,11 @@ PS_OPEN_FUNC(memcached)
return FAILURE;
}
}
+
+ if (memcached_behavior_set(memc_sess->memc_sess, MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT, (uint64_t) MEMC_G(sess_connect_timeout)) == MEMCACHED_FAILURE) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "failed to set memcached connection timeout");
+ return FAILURE;
+ }
/* Allow libmemcached remove failed servers */
if (MEMC_G(sess_remove_failed_enabled)) {

0 comments on commit 07879fb

Please sign in to comment.