Skip to content

Commit

Permalink
php_memcached_session.c added connect timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
xoJIog committed Nov 20, 2012
1 parent 0d1ff23 commit 07879fb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions php_memcached_session.c
Expand Up @@ -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)) {
Expand Down

0 comments on commit 07879fb

Please sign in to comment.