Skip to content

Commit bef1e38

Browse files
authored
xftp: add debug info to "too many recipients" error (#1410)
1 parent 4b43cb8 commit bef1e38

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Simplex/FileTransfer/Agent.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,8 +546,8 @@ runXFTPSndWorker c srv Worker {doWork} = do
546546
withStore' c $ \db -> updateSndFileComplete db sndFileId
547547
where
548548
addRecipients :: SndFileChunk -> SndFileChunkReplica -> AM SndFileChunkReplica
549-
addRecipients ch@SndFileChunk {numRecipients} cr@SndFileChunkReplica {rcvIdsKeys}
550-
| length rcvIdsKeys > numRecipients = throwE $ INTERNAL "too many recipients"
549+
addRecipients ch@SndFileChunk {numRecipients} cr@SndFileChunkReplica {sndChunkReplicaId, rcvIdsKeys}
550+
| length rcvIdsKeys > numRecipients = throwE $ INTERNAL ("too many recipients, sndChunkReplicaId = " <> show sndChunkReplicaId)
551551
| length rcvIdsKeys == numRecipients = pure cr
552552
| otherwise = do
553553
let numRecipients' = min (numRecipients - length rcvIdsKeys) maxRecipients

0 commit comments

Comments
 (0)