http: mitigate delayed close timeout race with connection write buffer flush (#6437)
Change the behavior of the delayed_close_timeout such that it won't trigger unless there has been at least a delayed_close_timeout period of inactivity after the last write event on the socket pending to be closed. This mitigates a race where a slow client and/or low timeout value would cause the socket to be closed while data was actively being written to the socket. Note that this change does not eliminate this race since a slow client could still be considered idle by the updated timeout logic, but this should be very rare when useful values (i.e., >1s to avoid the race condition on close that this timer addresses) are configured. Risk Level: Medium Testing: New unit tests added Docs Changes: Updated version history and HttpConnectionManager proto doc Fixes #6392 Signed-off-by: Andres Guedez <aguedez@google.com> Mirrored from https://github.com/envoyproxy/envoy @ cdaeb1344e4136d8c9ac33507005159c93087a49pull/620/head
parent
fea83fbf10
commit
d4e9e33e72
1 changed files with 17 additions and 4 deletions
Loading…
Reference in new issue