This is an automated email from the ASF dual-hosted git repository. zwoop pushed a commit to branch 7.1.x in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 059dc2fa2edc00e0f5b8f773b89b48616409bf31 Author: Oknet Xu <xuc...@skyguard.com.cn> AuthorDate: Tue Aug 22 15:03:39 2017 +0800 Correctly Handle EVENT_NONE in UnixNetVConnection::acceptEvent (cherry picked from commit a32f7ed3e49f595633f59cc44481f42af01f7a58) --- iocore/net/UnixNetVConnection.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/iocore/net/UnixNetVConnection.cc b/iocore/net/UnixNetVConnection.cc index c914f6c..fc6967a 100644 --- a/iocore/net/UnixNetVConnection.cc +++ b/iocore/net/UnixNetVConnection.cc @@ -1132,12 +1132,12 @@ UnixNetVConnection::startEvent(int /* event ATS_UNUSED */, Event *e) int UnixNetVConnection::acceptEvent(int event, Event *e) { - thread = e->ethread; + EThread *t = (e == nullptr) ? this_ethread() : e->ethread; - MUTEX_TRY_LOCK(lock, get_NetHandler(thread)->mutex, e->ethread); + MUTEX_TRY_LOCK(lock, get_NetHandler(t)->mutex, t); if (!lock.is_locked()) { if (event == EVENT_NONE) { - thread->schedule_in(this, HRTIME_MSECONDS(net_retry_delay)); + t->schedule_in(this, HRTIME_MSECONDS(net_retry_delay)); return EVENT_DONE; } else { e->schedule_in(HRTIME_MSECONDS(net_retry_delay)); @@ -1145,6 +1145,8 @@ UnixNetVConnection::acceptEvent(int event, Event *e) } } + thread = t; + if (action_.cancelled) { free(thread); return EVENT_DONE; -- To stop receiving notification emails like this one, please contact "commits@trafficserver.apache.org" <commits@trafficserver.apache.org>.