]> granicus.if.org Git - icinga2/commitdiff
Keep the HTTP server connection open until the stream is EOF 6662/head
authorMichael Friedrich <michael.friedrich@icinga.com>
Tue, 9 Oct 2018 14:01:43 +0000 (16:01 +0200)
committerMichael Friedrich <michael.friedrich@icinga.com>
Tue, 9 Oct 2018 14:01:43 +0000 (16:01 +0200)
fixes #4968

lib/remote/httpserverconnection.cpp

index 337673a69b81d84c6854f893ae01c51193982e53..913814b79722ae70502407295df6b2648f574a66 100644 (file)
@@ -383,7 +383,7 @@ void HttpServerConnection::DataAvailableHandler()
 
 void HttpServerConnection::CheckLiveness()
 {
-       if (m_Seen < Utility::GetTime() - 10 && m_PendingRequests == 0) {
+       if (m_Seen < Utility::GetTime() - 10 && m_PendingRequests == 0 && m_Stream->IsEof()) {
                Log(LogInformation, "HttpServerConnection")
                        <<  "No messages for Http connection have been received in the last 10 seconds.";
                Disconnect();