diff --git a/dbms/src/Interpreters/ClusterProxy/SelectStreamFactory.cpp b/dbms/src/Interpreters/ClusterProxy/SelectStreamFactory.cpp index 0bf593a6078..2c4ef9ec579 100644 --- a/dbms/src/Interpreters/ClusterProxy/SelectStreamFactory.cpp +++ b/dbms/src/Interpreters/ClusterProxy/SelectStreamFactory.cpp @@ -184,13 +184,15 @@ void SelectStreamFactory::createForShard( local_delay]() -> BlockInputStreamPtr { + auto current_settings = context.getSettingsRef(); + auto timeouts = ConnectionTimeouts::getTCPTimeoutsWithFailover(current_settings); std::vector try_results; try { if (table_func_ptr) - try_results = pool->getManyForTableFunction(&context.getSettingsRef(), PoolMode::GET_MANY); + try_results = pool->getManyForTableFunction(timeouts, ¤t_settings, PoolMode::GET_MANY); else - try_results = pool->getManyChecked(&context.getSettingsRef(), PoolMode::GET_MANY, main_table); + try_results = pool->getManyChecked(timeouts, ¤t_settings, PoolMode::GET_MANY, main_table); } catch (const Exception & ex) {