mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 06:03:02 +01:00
Fixed CORE-2769: Make XNET_CONNECT_TIMEOUT in xnet.h user configurable.
This commit is contained in:
parent
ef0fbde3bc
commit
800191245a
@ -1088,9 +1088,11 @@ static rem_port* connect_client(PACKET* packet, ISC_STATUS* status_vector)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const int timeout = Config::getConnectionTimeout() * 1000;
|
||||
|
||||
// waiting for XNET connect lock to release
|
||||
|
||||
if (WaitForSingleObject(xnet_connect_mutex, XNET_CONNECT_TIMEOUT) != WAIT_OBJECT_0)
|
||||
if (WaitForSingleObject(xnet_connect_mutex, timeout) != WAIT_OBJECT_0)
|
||||
{
|
||||
connect_fini();
|
||||
XNET_UNLOCK();
|
||||
@ -1109,7 +1111,7 @@ static rem_port* connect_client(PACKET* packet, ISC_STATUS* status_vector)
|
||||
|
||||
// waiting for server response
|
||||
|
||||
if (WaitForSingleObject(xnet_response_event, XNET_CONNECT_TIMEOUT) != WAIT_OBJECT_0)
|
||||
if (WaitForSingleObject(xnet_response_event, timeout) != WAIT_OBJECT_0)
|
||||
{
|
||||
ReleaseMutex(xnet_connect_mutex);
|
||||
connect_fini();
|
||||
|
@ -37,9 +37,6 @@
|
||||
#define FILE_ID HANDLE
|
||||
#endif
|
||||
|
||||
// Client connect timeout (ms)
|
||||
const DWORD XNET_CONNECT_TIMEOUT = 10000;
|
||||
|
||||
// Receive wait timeout (ms)
|
||||
const DWORD XNET_RECV_WAIT_TIMEOUT = 10000;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user