Github user oknet commented on a diff in the pull request:
https://github.com/apache/trafficserver/pull/766#discussion_r71065565
--- Diff: iocore/net/UnixNetVConnection.cc ---
@@ -1139,8 +1139,8 @@ UnixNetVConnection::mainEvent(int event, Event *e)
(write.vio.mutex && wlock.get_mutex() != write.vio.mutex.get())) {
#ifdef INACTIVITY_TIMEOUT
if (e == active_timeout)
-#endif
e->schedule_in(HRTIME_MSECONDS(net_retry_delay));
+#endif
return EVENT_CONT;
--- End diff --
yes, currently default build ats without INACTIVITY_TIMEOUT defined.
that's means the UnixNetVConnection::mainEvent(int event, Event *e) is
callbacked from InactivityCop::check_inactivity(int event, Event *e) and/or
NetHandler::_close_vc().
The Event *e is InactivityCop's Event when it is callbacked from
InactivityCop::check_inactivity(int event, Event *e). and the Event is a
perorid Event.
thus we don't need to to e->schedule_in() for it.
The Event *e is a dummy Event when it is callbacked from
NetHandler::_close_vc(). To schedule a dummy Event will lead memory leak and
ATS crash.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---