Update channels/reliable_channel.nim

Co-authored-by: NagyZoltanPeter <113987313+NagyZoltanPeter@users.noreply.github.com>
This commit is contained in:
Ivan FB 2026-05-29 08:37:36 +02:00 committed by GitHub
parent 0dca710ac0
commit ec6a02db7c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -137,11 +137,7 @@ 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.
var ongoing: HashSet[RequestId]
for entry in self.pendingMessagingRequests:
if not entry.segmentSendState.isFinal:
ongoing.incl(entry.channelReqId)
self.pendingMessagingRequests.keepItIf(it.channelReqId in ongoing)
self.pendingMessagingRequests.keepItIf(not it.segmentSendState.isFinal())
proc onMessageSent(self: ReliableChannel, messagingReqId: RequestId) =
## Invoked from this channel's `MessageSentEvent` listener. Flips