Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions clickhouse/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,13 @@ bool Client::Impl::Handshake() {
}

if (server_info_.revision >= DBMS_MIN_PROTOCOL_VERSION_WITH_ADDENDUM) {
// The server reads the addendum as part of the handshake and, since
// handshake_timeout_milliseconds (default 30s), drops the connection
// if it does not arrive in time. Without this flush the addendum only
// left the buffer with the first query, so a connection that was idle
// for 30s after connecting was closed with SOCKET_TIMEOUT.
WireFormat::WriteString(*output_, std::string());
output_->Flush();
}

return true;
Expand Down
Loading