|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-11-09 02:17 UTC] hradtke@php.net
-Status: Open
+Status: Assigned
-Assigned To:
+Assigned To: hradtke
[2017-10-24 06:59 UTC] kalle@php.net
-Status: Assigned
+Status: Open
-Assigned To: hradtke
+Assigned To:
[2021-03-25 16:47 UTC] cmb@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: cmb
[2021-03-25 16:47 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 15 02:00:01 2025 UTC |
Description: ------------ $m = new Memcache(); $m->connect('127.0.0.1',11211,5); timeout always 1 sec, because: static void php_mmc_connect (INTERNAL_FUNCTION_PARAMETERS, int persistent) /* {{{ */ { if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lll", &host, &host_len, &port, &timeout, &timeoutms) == FAILURE) { return; } if (timeoutms < 1) { timeoutms = MEMCACHE_G(default_timeout_ms); } mmc->timeout = timeout; mmc->connect_timeoutms = timeoutms; ... } timeoutms = default_timeout_ms = 1000 next: static int _mmc_open(mmc_t *mmc, char **error_string, int *errnum TSRMLS_DC) /* {{{ */ { struct timeval tv; if (mmc->connect_timeoutms > 0) { tv = _convert_timeoutms_to_ts(mmc->connect_timeoutms); } else { tv.tv_sec = mmc->timeout; tv.tv_usec = 0; } ... } So, tv.tv_sec = 1 sec