From c8701c13cb0d3b3c17e00decc7e3ec18fb2a7d1d Mon Sep 17 00:00:00 2001 From: liamcottle Date: Sat, 14 Dec 2024 21:26:08 +1300 Subject: [PATCH] allow receiving parts in offering state --- src/js/Connection.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/js/Connection.js b/src/js/Connection.js index e769337..f053fc2 100644 --- a/src/js/Connection.js +++ b/src/js/Connection.js @@ -651,9 +651,9 @@ class Connection { return; } - // do nothing if file transfer not in accepted or receiving state - if(fileTransfer.status !== FileTransferrer.STATUS_ACCEPTED && fileTransfer.status !== FileTransferrer.STATUS_RECEIVING){ - console.log(`[FileTransfer] ${fileTransfer.id} received part ${filePart.partIndex + 1}/${filePart.totalParts}, but not in accepted or receiving state.`); + // do nothing if file transfer not in offering, accepted or receiving state + if(fileTransfer.status !== FileTransferrer.STATUS_OFFERING && fileTransfer.status !== FileTransferrer.STATUS_ACCEPTED && fileTransfer.status !== FileTransferrer.STATUS_RECEIVING){ + console.log(`[FileTransfer] ${fileTransfer.id} received part ${filePart.partIndex + 1}/${filePart.totalParts}, but not in offering, accepted or receiving state.`); return; }