tracker_get(close)_all_connections without connection pool
parent
ac26b1d12f
commit
58be6d0a3a
|
|
@ -38,7 +38,7 @@ int tracker_get_all_connections_ex(TrackerServerGroup *pTrackerGroup)
|
|||
pEnd = pTrackerGroup->servers + pTrackerGroup->server_count;
|
||||
for (pServer=pTrackerGroup->servers; pServer<pEnd; pServer++)
|
||||
{
|
||||
if ((conn=tracker_connect_server(pServer, &result)) != NULL)
|
||||
if ((conn=tracker_connect_server_no_pool(pServer, &result)) != NULL)
|
||||
{
|
||||
fdfs_active_test(conn);
|
||||
success_count++;
|
||||
|
|
@ -56,7 +56,7 @@ void tracker_close_all_connections_ex(TrackerServerGroup *pTrackerGroup)
|
|||
pEnd = pTrackerGroup->servers + pTrackerGroup->server_count;
|
||||
for (pServer=pTrackerGroup->servers; pServer<pEnd; pServer++)
|
||||
{
|
||||
tracker_disconnect_server(pServer);
|
||||
tracker_disconnect_server_no_pool(pServer);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
3
make.sh
3
make.sh
|
|
@ -1,6 +1,7 @@
|
|||
ENABLE_STATIC_LIB=0
|
||||
ENABLE_SHARED_LIB=1
|
||||
TARGET_PREFIX=$DESTDIR/usr
|
||||
DESTDIR=/usr/local
|
||||
TARGET_PREFIX=$DESTDIR
|
||||
TARGET_CONF_PATH=$DESTDIR/etc/fdfs
|
||||
TARGET_INIT_PATH=$DESTDIR/etc/init.d
|
||||
|
||||
|
|
|
|||
|
|
@ -555,6 +555,24 @@ void tracker_disconnect_server(TrackerServerInfo *pServerInfo)
|
|||
}
|
||||
}
|
||||
|
||||
void tracker_disconnect_server_no_pool(TrackerServerInfo *pServerInfo)
|
||||
{
|
||||
ConnectionInfo *conn;
|
||||
ConnectionInfo *end;
|
||||
|
||||
if (pServerInfo->count == 1)
|
||||
{
|
||||
conn_pool_disconnect_server(pServerInfo->connections + 0);
|
||||
return;
|
||||
}
|
||||
|
||||
end = pServerInfo->connections + pServerInfo->count;
|
||||
for (conn=pServerInfo->connections; conn<end; conn++)
|
||||
{
|
||||
conn_pool_disconnect_server(conn);
|
||||
}
|
||||
}
|
||||
|
||||
static int fdfs_do_parameter_req(ConnectionInfo *pTrackerServer, \
|
||||
char *buff, const int buff_size)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -271,6 +271,8 @@ void tracker_close_connection_ex(ConnectionInfo *conn, \
|
|||
|
||||
void tracker_disconnect_server(TrackerServerInfo *pServerInfo);
|
||||
|
||||
void tracker_disconnect_server_no_pool(TrackerServerInfo *pServerInfo);
|
||||
|
||||
ConnectionInfo *tracker_make_connection_ex(ConnectionInfo *conn,
|
||||
const int connect_timeout, int *err_no);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue