From c01a986727822ab9281d9dd2a48278ee7bdf4ad6 Mon Sep 17 00:00:00 2001 From: Vladimir Smirnov Date: Mon, 15 May 2023 05:20:52 +0300 Subject: [PATCH] Fix channel alive check. --- src/Platform/SocketFrameHandler.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Platform/SocketFrameHandler.cpp b/src/Platform/SocketFrameHandler.cpp index bbc45f6..e82bfb3 100644 --- a/src/Platform/SocketFrameHandler.cpp +++ b/src/Platform/SocketFrameHandler.cpp @@ -577,8 +577,9 @@ bool SocketFrameHandler::CheckConnection() const if (!needToCheckReadActivity) return true; - const bool readActivityOk = m_lastSucceessfulRead.GetElapsedTime() < m_settings.m_channelActivityTimeout; - return readActivityOk; + const bool readActivityOk = m_lastSucceessfulRead.GetElapsedTime() < m_settings.m_channelActivityTimeout; + const bool writeActivityOk = m_lastSucceessfulWrite.GetElapsedTime() < m_settings.m_channelActivityTimeout; + return readActivityOk || writeActivityOk; } bool SocketFrameHandler::CheckAndCreateConnection()