MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / forceConnected

Method forceConnected

src/Client/Connection.cpp:742–754  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

740}
741
742void Connection::forceConnected(const ConnectionTimeouts & timeouts)
743{
744 if (!isConnected())
745 {
746 connect(timeouts);
747 }
748 else if (!ping(timeouts))
749 {
750 ProfileEvents::increment(ProfileEvents::DistributedConnectionReconnectCount);
751 LOG_TRACE(log_wrapper.get(), "Connection was closed, will reconnect.");
752 connect(timeouts);
753 }
754}
755
756#if USE_SSL
757void Connection::sendClusterNameAndSalt()

Callers 4

tryToReconnectMethod · 0.45
getMethod · 0.45
runMethod · 0.45
getMethod · 0.45

Calls 4

connectFunction · 0.85
pingFunction · 0.50
incrementFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected