Skip to content

Commit 1cd51eb

Browse files
committed
php_memcached.c added connect timeout variable
1 parent 40ce9b4 commit 1cd51eb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

php_memcached.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ PHP_INI_BEGIN()
294294
STD_PHP_INI_ENTRY("memcached.sess_randomize_replica_read", "0", PHP_INI_ALL, OnUpdateBool, sess_randomize_replica_read, zend_php_memcached_globals, php_memcached_globals)
295295
STD_PHP_INI_ENTRY("memcached.sess_consistent_hashing", "0", PHP_INI_ALL, OnUpdateBool, sess_consistent_hashing_enabled, zend_php_memcached_globals, php_memcached_globals)
296296
STD_PHP_INI_ENTRY("memcached.sess_remove_failed", "0", PHP_INI_ALL, OnUpdateBool, sess_remove_failed_enabled, zend_php_memcached_globals, php_memcached_globals)
297+
STD_PHP_INI_ENTRY("memcached.sess_connect_timeout", "1000", PHP_INI_ALL, OnUpdateLong, sess_connect_timeout, zend_php_memcached_globals, php_memcached_globals)
297298
#endif
298299
STD_PHP_INI_ENTRY("memcached.compression_type", "fastlz", PHP_INI_ALL, OnUpdateCompressionType, compression_type, zend_php_memcached_globals, php_memcached_globals)
299300
STD_PHP_INI_ENTRY("memcached.compression_factor", "1.3", PHP_INI_ALL, OnUpdateReal, compression_factor, zend_php_memcached_globals, php_memcached_globals)
@@ -3050,8 +3051,8 @@ static void php_memc_init_globals(zend_php_memcached_globals *php_memcached_glob
30503051
MEMC_G(sess_locked) = 0;
30513052
MEMC_G(sess_lock_key) = NULL;
30523053
MEMC_G(sess_lock_key_len) = 0;
3053-
MEMC_G(sess_number_of_replicas) = 0;
30543054
MEMC_G(sess_randomize_replica_read) = 0;
3055+
MEMC_G(sess_connect_timeout) = 1000;
30553056
#endif
30563057
MEMC_G(serializer_name) = NULL;
30573058
MEMC_G(serializer) = SERIALIZER_DEFAULT;

0 commit comments

Comments
 (0)