]> granicus.if.org Git - icinga2/commitdiff
JsonRpcConnection: add missing CpuBoundWork
authorAlexander A. Klimov <alexander.klimov@icinga.com>
Wed, 20 Feb 2019 13:41:01 +0000 (14:41 +0100)
committerAlexander A. Klimov <alexander.klimov@icinga.com>
Mon, 1 Apr 2019 11:31:16 +0000 (13:31 +0200)
lib/remote/jsonrpcconnection.cpp

index d529427f0b6ac0545a2b26b278dd134c03777208..fa8b65ffc8347352f03b4cdefa1c96f085adb4f9 100644 (file)
@@ -87,6 +87,8 @@ void JsonRpcConnection::HandleIncomingMessages(boost::asio::yield_context yc)
                        break;
                }
 
+               CpuBoundWork taskStats (yc);
+
                l_TaskStats.InsertValue(Utility::GetTime(), 1);
        }
 }
@@ -201,6 +203,8 @@ void JsonRpcConnection::Disconnect()
                        } catch (...) {
                        }
 
+                       CpuBoundWork removeClient (yc);
+
                        if (m_Endpoint) {
                                m_Endpoint->RemoveClient(this);
                        } else {