Use Kill() instead of Unschedule() to prevent against unwanted re-scheduling
@@ -424,7 +424,7 @@ void
RPCNetwork::shutdown()
{
// Unschedule any pending target pool flush task that may race with shutdown target flushing
- _scheduler.Unschedule(_targetPoolTask.get());
+ _scheduler.Kill(_targetPoolTask.get());
_transport->ShutDown(true);
_threadPool->Close();
_executor->shutdown().sync();
