Skip to content

Commit e3121e1

Browse files
committed
Update stale comment: m_downloading_shares.clear() is now a safety net
The root cause (silent timeout drops) was fixed in 0219cde by making ReplyMatcher invoke callbacks on timeout and adding peer disconnect cancellation. The clear() remains as defense-in-depth.
1 parent 0219cde commit e3121e1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/impl/ltc/node.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,9 +1374,9 @@ void NodeImpl::run_think()
13741374

13751375
// p2pool node.py:108-141: download_shares is a continuous loop
13761376
// that re-requests every cycle with no dedup set.
1377-
// c2pool's ReplyMatcher timeout (5s) silently drops the callback,
1378-
// leaving stale entries in m_downloading_shares that permanently
1379-
// block re-requesting. Clear each cycle to match p2pool behavior.
1377+
// Safety: clear stale entries each cycle. Normally cleaned up by
1378+
// ReplyMatcher timeout callbacks and peer disconnect cancellation,
1379+
// but this ensures no hash gets permanently stuck.
13801380
m_downloading_shares.clear();
13811381

13821382
if (!result.desired.empty() && !m_peers.empty()) {

0 commit comments

Comments
 (0)