bryancall commented on a change in pull request #7226:
URL: https://github.com/apache/trafficserver/pull/7226#discussion_r497067124



##########
File path: iocore/net/UnixNet.cc
##########
@@ -70,7 +70,10 @@ class InactivityCop : public Continuation
       }
 
       // set a default inactivity timeout if one is not set
-      if (ne->next_inactivity_timeout_at == 0 && 
nh.config.default_inactivity_timeout > 0) {
+      // The event `EVENT_INACTIVITY_TIMEOUT` only be triggered if a read
+      // or write I/O operation was set by `do_io_read()` or `do_io_write()`.
+      if (ne->next_inactivity_timeout_at == 0 && 
nh.config.default_inactivity_timeout > 0 &&

Review comment:
       I am seeing cases where default_inactivity_timeout is being set on 
server sessions when ne->read.enabled and ne->write.enabled are 0.  I haven't 
tracked down if that is required or not for closing the server sessions.
   
   
   ```
   Thread 15 "[ET_NET 12]" hit Breakpoint 1, InactivityCop::check_inactivity 
(this=0x7fffc40a0ba0, event=2, e=0xe8aac0) at ../../../iocore/net/UnixNet.cc:74
   74           Debug("inactivity_cop", "vc: %p inactivity timeout not set, 
setting a default of %d", ne,
   (gdb) p ne->next_inactivity_timeout_at
   $1 = 0
   (gdb) p nh.config.default_inactivity_timeout
   $2 = 300
   (gdb) p ne->read.enabled
   $3 = 0
   (gdb) p ne->write.enabled
   $4 = 0
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to