The Z39.50 client now has a separate timeout during the connect
phase. Most often if connect has not completed within a few seconds,
the server is really down and it's not worh waiting 30 seconds or more.
int m_queue_len;
int m_time_elapsed;
int m_time_max;
int m_queue_len;
int m_time_elapsed;
int m_time_max;
+ int m_time_connect_max;
m_socket_manager(socket_manager), m_PDU_Observable(PDU_Observable),
m_package(0), m_in_use(true), m_waiting(false),
m_destroyed(false), m_connected(false), m_queue_len(1),
m_socket_manager(socket_manager), m_PDU_Observable(PDU_Observable),
m_package(0), m_in_use(true), m_waiting(false),
m_destroyed(false), m_connected(false), m_queue_len(1),
- m_time_elapsed(0), m_time_max(timeout_sec),
+ m_time_elapsed(0), m_time_max(timeout_sec), m_time_connect_max(10),
m_host(host)
{
// std::cout << "create assoc " << this << "\n";
m_host(host)
{
// std::cout << "create assoc " << this << "\n";
void yf::Z3950Client::Assoc::timeoutNotify()
{
m_time_elapsed++;
void yf::Z3950Client::Assoc::timeoutNotify()
{
m_time_elapsed++;
- if (m_time_elapsed >= m_time_max)
+ if ((m_connected && m_time_elapsed >= m_time_max)
+ || (!m_connected && m_time_elapsed >= m_time_connect_max))