You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2019/10/21 18:20:44 UTC
[trafficserver] branch 9.0.x updated: do not schedule stuff during
shutdown
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new e0d70d6 do not schedule stuff during shutdown
e0d70d6 is described below
commit e0d70d66dd97713c8183ad8f2d6f035f3fac3d31
Author: Fei Deng <du...@gmail.com>
AuthorDate: Thu Oct 10 12:18:10 2019 -0500
do not schedule stuff during shutdown
(cherry picked from commit d970c3787d20ad6c7a0d04bb9ac23988f6fd2962)
---
iocore/eventsystem/P_UnixEventProcessor.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/iocore/eventsystem/P_UnixEventProcessor.h b/iocore/eventsystem/P_UnixEventProcessor.h
index 8ebf1f9..df4d419 100644
--- a/iocore/eventsystem/P_UnixEventProcessor.h
+++ b/iocore/eventsystem/P_UnixEventProcessor.h
@@ -23,6 +23,8 @@
#pragma once
+#include <tscore/TSSystemState.h>
+
#include "tscore/ink_align.h"
#include "I_EventProcessor.h"
@@ -91,6 +93,10 @@ EventProcessor::schedule(Event *e, EventType etype, bool fast_signal)
{
ink_assert(etype < MAX_EVENT_TYPES);
+ if (TSSystemState::is_event_system_shut_down()) {
+ return nullptr;
+ }
+
EThread *ethread = e->continuation->getThreadAffinity();
if (ethread != nullptr && ethread->is_event_type(etype)) {
e->ethread = ethread;