From 9cf2a38eb8198a473357f7ceeb2ba56ac4561b4b Mon Sep 17 00:00:00 2001 From: Alexander Kuzmenkov Date: Tue, 1 Sep 2020 03:22:06 +0300 Subject: [PATCH] fixup --- programs/client/Client.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/programs/client/Client.cpp b/programs/client/Client.cpp index eb95b3634ca..c9701950dc5 100644 --- a/programs/client/Client.cpp +++ b/programs/client/Client.cpp @@ -861,12 +861,12 @@ private: // We didn't read enough text to parse a query. Will read more. } - if (!connection->ping()) - { - // Uh-oh... - last_exception_received_from_server = std::make_unique(210, "Lost connection to the server."); - return; - } + // Ensure that we're still connected to the server. If the server died, + // the reconnect is going to fail with an exception, and the fuzzer + // will exit. The ping() would be the best match here, but it's + // private, probably for a good reason that the protocol doesn't allow + // pings at any possible moment. + connection->forceConnected(connection_parameters.timeouts); if (text.size() > 4 * 1024) {