fix logic issue added recently

This commit is contained in:
Ivan FB 2026-05-29 09:06:07 +02:00
parent 41a43174be
commit 95f56e653e
No known key found for this signature in database
GPG Key ID: DF0C67A04C543270

View File

@ -137,7 +137,11 @@ proc pruneCompletedChannelReqs(self: ReliableChannel) =
## segment doesn't trigger a drop on its own — we wait until siblings
## are also accounted for, so the channel-level outcome is decided
## from a complete picture.
self.pendingMessagingRequests.keepItIf(not it.segmentSendState.isFinal())
var channelsWithPending = initHashSet[RequestId]()
for entry in self.pendingMessagingRequests:
if not entry.segmentSendState.isFinal():
channelsWithPending.incl(entry.channelReqId)
self.pendingMessagingRequests.keepItIf(it.channelReqId in channelsWithPending)
proc onMessageSent(self: ReliableChannel, messagingReqId: RequestId) =
## Invoked from this channel's `MessageSentEvent` listener. Flips