Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions iocore/net/P_UnixNet.h
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,9 @@ static inline void
read_disable(NetHandler *nh, NetEvent *ne)
{
if (!ne->write.enabled) {
ne->set_inactivity_timeout(0);
// Clear the next scheduled inactivity time, but don't clear inactivity_timeout_in,
// so the current timeout is used when the NetEvent is reenabled and not the default inactivity timeout
ne->next_inactivity_timeout_at = 0;
Debug("socket", "read_disable updating inactivity_at %" PRId64 ", NetEvent=%p", ne->next_inactivity_timeout_at, ne);
}
ne->read.enabled = 0;
Expand All @@ -569,7 +571,9 @@ static inline void
write_disable(NetHandler *nh, NetEvent *ne)
{
if (!ne->read.enabled) {
ne->set_inactivity_timeout(0);
// Clear the next scheduled inactivity time, but don't clear inactivity_timeout_in,
// so the current timeout is used when the NetEvent is reenabled and not the default inactivity timeout
ne->next_inactivity_timeout_at = 0;
Debug("socket", "write_disable updating inactivity_at %" PRId64 ", NetEvent=%p", ne->next_inactivity_timeout_at, ne);
}
ne->write.enabled = 0;
Expand Down