A user callback may call ->close and invalidate {sock} or even
replace it, so we must revalidate the {sock} field and break
break out of the loop ASAP to ensure we don't attempt further
operations on an invalid socket.
This really ought to fix the
`BUG: ep_mod GLOB=GLOB(...): no such file or directory' (ENOENT)
errors on EPOLL_CTL_MOD when a client shuts down TLS on us.
Followup-to: f7aaea70 (ds: shutdn_tls_step clobbers {wbuf} early, 2025-06-17)
# bref may be enqueueing more CODE to call
# (see accept_tls_step)
return 0 if (scalar(@$wbuf) > $before);
+ $sock = $self->{sock} // return;
}
} # while @$wbuf