From 7db84dfcb6bb54155291eaeec948fdbaf8b9da36 Mon Sep 17 00:00:00 2001 From: Jon Siwek Date: Fri, 27 Dec 2019 09:10:01 -0800 Subject: [PATCH] Skip sending thread heartbeat if it alread asked to be finished Otherwise the heartbeat message may fail to be processed and show up as leaked memory. --- src/threading/MsgThread.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/threading/MsgThread.cc b/src/threading/MsgThread.cc index 7d7ab73a50..01f90921e8 100644 --- a/src/threading/MsgThread.cc +++ b/src/threading/MsgThread.cc @@ -260,6 +260,9 @@ void MsgThread::OnKill() void MsgThread::Heartbeat() { + if ( child_sent_finish ) + return; + SendIn(new HeartbeatMessage(this, network_time, current_time())); }