call conn_pool_connect_server with timeout_ms

use_libfastcommon1.70
YuQing 2023-10-24 17:22:24 +08:00
parent 64e0a536dc
commit 8363843597
5 changed files with 10 additions and 10 deletions

View File

@ -943,7 +943,7 @@ static void php_fdfs_connect_server_impl(INTERNAL_FUNCTION_PARAMETERS, \
server_info.sock = -1;
if ((pContext->err_no=conn_pool_connect_server(&server_info, \
SF_G_NETWORK_TIMEOUT)) == 0)
SF_G_NETWORK_TIMEOUT * 1000)) == 0)
{
array_init(return_value);
zend_add_assoc_stringl_ex(return_value, "ip_addr", \

View File

@ -362,7 +362,7 @@ static void sigAlarmHandler(int sig)
server.port = SF_G_INNER_PORT;
server.sock = -1;
if (conn_pool_connect_server(&server, SF_G_CONNECT_TIMEOUT) != 0)
if (conn_pool_connect_server(&server, SF_G_CONNECT_TIMEOUT * 1000) != 0)
{
return;
}

View File

@ -27,8 +27,8 @@ static ConnectionInfo *getConnectedStorageServer(
{
if (pServer->sock < 0)
{
*err_no = conn_pool_connect_server(pServer, \
SF_G_CONNECT_TIMEOUT);
*err_no = conn_pool_connect_server(pServer,
SF_G_CONNECT_TIMEOUT * 1000);
if (*err_no != 0)
{
return NULL;
@ -46,8 +46,8 @@ static ConnectionInfo *getConnectedStorageServer(
pServer = pEnd;
memcpy(pServer, pStorageServer, sizeof(ConnectionInfo));
pServer->sock = -1;
if ((*err_no=conn_pool_connect_server(pServer, \
SF_G_CONNECT_TIMEOUT)) != 0)
if ((*err_no=conn_pool_connect_server(pServer,
SF_G_CONNECT_TIMEOUT * 1000)) != 0)
{
return NULL;
}

View File

@ -434,7 +434,7 @@ static void sigAlarmHandler(int sig)
server.port = SF_G_INNER_PORT;
server.sock = -1;
if (conn_pool_connect_server(&server, SF_G_CONNECT_TIMEOUT) != 0)
if (conn_pool_connect_server(&server, SF_G_CONNECT_TIMEOUT * 1000) != 0)
{
return;
}

View File

@ -501,7 +501,7 @@ ConnectionInfo *tracker_connect_server_no_pool_ex(TrackerServerInfo *pServerInfo
}
*err_no = conn_pool_connect_server_ex(pServerInfo->connections
+ pServerInfo->index, SF_G_CONNECT_TIMEOUT,
+ pServerInfo->index, SF_G_CONNECT_TIMEOUT * 1000,
bind_addr, log_connect_error);
if (*err_no == 0)
{
@ -520,7 +520,7 @@ ConnectionInfo *tracker_connect_server_no_pool_ex(TrackerServerInfo *pServerInfo
if (current_index != pServerInfo->index)
{
if ((*err_no=conn_pool_connect_server_ex(conn,
SF_G_CONNECT_TIMEOUT, bind_addr,
SF_G_CONNECT_TIMEOUT * 1000, bind_addr,
log_connect_error)) == 0)
{
pServerInfo->index = current_index;
@ -542,7 +542,7 @@ ConnectionInfo *tracker_make_connection_ex(ConnectionInfo *conn,
}
else
{
*err_no = conn_pool_connect_server(conn, connect_timeout);
*err_no = conn_pool_connect_server(conn, connect_timeout * 1000);
if (*err_no != 0)
{
return NULL;