fix: Bug - Sending files and attachment issues (cross-transport auto-download race)
Re-queue attachment auto-downloads when the chat message arrives, since file-announce (WebRTC) can beat chat-message (websocket) and the announce-time pass gives up on an unknown room. Gate stalled-download resets on chunk-progress staleness so an active transfer is never cancelled mid-stream, which deadlocked the retry against the sender's active-transfer dedupe. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+2
-1
@@ -382,7 +382,8 @@ export class AttachmentManagerService {
|
||||
|
||||
if (shouldResetStalledAttachmentDownload(
|
||||
attachment,
|
||||
this.transfer.hasPendingRequest(messageId, attachment.id)
|
||||
this.transfer.hasPendingRequest(messageId, attachment.id),
|
||||
Date.now()
|
||||
)) {
|
||||
this.transfer.cancelRequest(messageId, attachment);
|
||||
} else if ((attachment.receivedBytes ?? 0) > 0) {
|
||||
|
||||
Reference in New Issue
Block a user