]> git.ipfire.org Git - thirdparty/squid.git/commit
Bug 5186: noteDestinationsEnd check failed: transportWait (#985)
authorAlex Rousskov <rousskov@measurement-factory.com>
Wed, 13 Apr 2022 03:22:18 +0000 (03:22 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Wed, 13 Apr 2022 20:29:09 +0000 (20:29 +0000)
commite2bbd3b3f1b5d11f375189a94d41070c52fa4d2c
treea051c90011c51da78e7e5d097ec47973bd3bf573
parent879c39f72fa77f60c565dbda90ffd6cf8721b369
Bug 5186: noteDestinationsEnd check failed: transportWait (#985)

When the "no more destinations to try" notification comes after the last
forwarding/tunneling attempt has failed, the !destinationsFound block
does not run (because destinations were found), the usingDestination()
block does not run (because we are done with that last/failed
destination), but transportWait is false (for the same reason).

Also applied Bug 5090 (master/v6 commit 15bde30) FwdState protections to
tunnel.cc code. Tunnels may continue writing to the client while the
to-server connection is closing or closed, so TunnelStateData can be
potentially exposed to bug 5090 "no server connection but still
transporting" concerns. TunnelStateData never _retries_ successfully
established tunnels and, hence, can (and now does) stop receiving spare
destinations after committedToServer becomes true, but future tunnels
may start reforwarding in many cases, and most of the code does not need
to know about this (temporary?) simplification.

Also re-unified and polished related FwdState and TunnelStateData code,
including fixing lying source code comments and debug messages.
src/FwdState.cc
src/tunnel.cc