]> git.ipfire.org Git - thirdparty/squid.git/commit - src/peer_digest.cc
Fix livelocking in peerDigestHandleReply (#698)
authorEduard Bagdasaryan <eduard.bagdasaryan@measurement-factory.com>
Mon, 27 Jul 2020 15:28:31 +0000 (15:28 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Wed, 29 Jul 2020 15:30:55 +0000 (15:30 +0000)
commit05cb3e57c0fa0cafc4bb4eee41e3731b044faa53
tree50e89c833f0cd48d4036ccb685e1e6eb68b8be20
parent7224761075454417d79b689d839c6e950e49924b
Fix livelocking in peerDigestHandleReply (#698)

peerDigestHandleReply() was missing a premature EOF check. The existing
peerDigestFetchedEnough() cannot detect EOF because it does not have
access to receivedData.length used to indicate the EOF condition. We did
not adjust peerDigestFetchedEnough() because it is abused to check both
post-I/O state and the state after each digest processing step. The
latter invocations lack access to receivedData.length and should not
really bother with EOF anyway.
src/peer_digest.cc