connection: make sure connection timeouts are applied during sendQuery

This commit is contained in:
Konstantin Podshumok 2019-03-03 00:39:52 +03:00
parent 94b2bf5551
commit 6836bf6733
2 changed files with 2 additions and 7 deletions

View File

@ -361,6 +361,8 @@ void Connection::sendQuery(
if (!connected)
connect(timeouts);
TimeoutSetter timeout_setter(*socket, timeouts.send_timeout, timeouts.receive_timeout, true);
if (settings)
{
std::optional<int> level;

View File

@ -121,12 +121,6 @@ public:
UInt16 getPort() const;
const String & getDefaultDatabase() const;
/// For proper polling.
//inline const auto & getTimeouts() const
//{
// return timeouts;
//}
/// If last flag is true, you need to call sendExternalTablesData after.
void sendQuery(
const ConnectionTimeouts & timeouts,
@ -221,7 +215,6 @@ private:
*/
ThrottlerPtr throttler;
//ConnectionTimeouts timeouts;
Poco::Timespan sync_request_timeout;
/// From where to read query execution result.