diff --git a/src/factory/HttpTaskImpl.cc b/src/factory/HttpTaskImpl.cc index 719447a184..b929610d67 100644 --- a/src/factory/HttpTaskImpl.cc +++ b/src/factory/HttpTaskImpl.cc @@ -481,6 +481,7 @@ class ComplexHttpProxyTask : public ComplexHttpTask virtual CommMessageOut *message_out(); virtual CommMessageIn *message_in(); virtual int keep_alive_timeout(); + virtual int first_timeout(); virtual bool init_success(); virtual bool finish_once(); @@ -652,6 +653,11 @@ int ComplexHttpProxyTask::keep_alive_timeout() return this->ComplexHttpTask::keep_alive_timeout(); } +int ComplexHttpProxyTask::first_timeout() +{ + return is_user_request_ ? this->watch_timeo : 0; +} + bool ComplexHttpProxyTask::init_success() { if (!uri_.scheme || strcasecmp(uri_.scheme, "http") != 0) diff --git a/src/factory/MySQLTaskImpl.cc b/src/factory/MySQLTaskImpl.cc index 9ad070c9eb..ad3dd231ed 100644 --- a/src/factory/MySQLTaskImpl.cc +++ b/src/factory/MySQLTaskImpl.cc @@ -45,6 +45,7 @@ class ComplexMySQLTask : public WFComplexClientTask virtual CommMessageOut *message_out(); virtual CommMessageIn *message_in(); virtual int keep_alive_timeout(); + virtual int first_timeout(); virtual bool init_success(); virtual bool finish_once(); @@ -523,6 +524,11 @@ int ComplexMySQLTask::keep_alive_timeout() return MYSQL_KEEPALIVE_DEFAULT; } +int ComplexMySQLTask::first_timeout() +{ + return is_user_request_ ? this->watch_timeo : 0; +} + /* +--------------------+---------------------+-----+ | CHARACTER_SET_NAME | COLLATION_NAME | ID | diff --git a/src/factory/RedisTaskImpl.cc b/src/factory/RedisTaskImpl.cc index ca0bc02f10..d34defa1b1 100644 --- a/src/factory/RedisTaskImpl.cc +++ b/src/factory/RedisTaskImpl.cc @@ -47,6 +47,7 @@ class ComplexRedisTask : public WFComplexClientTask virtual CommMessageOut *message_out(); virtual CommMessageIn *message_in(); virtual int keep_alive_timeout(); + virtual int first_timeout(); virtual bool init_success(); virtual bool finish_once(); @@ -142,6 +143,11 @@ int ComplexRedisTask::keep_alive_timeout() return succ_ ? REDIS_KEEPALIVE_DEFAULT : 0; } +int ComplexRedisTask::first_timeout() +{ + return is_user_request_ ? this->watch_timeo : 0; +} + bool ComplexRedisTask::init_success() { enum TransportType type;