diff --git a/src/js/FileTransferAPI.js b/src/js/FileTransferAPI.js index 1d22f96..8118f4a 100644 --- a/src/js/FileTransferAPI.js +++ b/src/js/FileTransferAPI.js @@ -36,7 +36,7 @@ class FileTransferAPI { } - static async sendFileTransferRequest(nodeId, fileTransferId, fileName, fileSize) { + static async offerFileTransfer(nodeId, fileTransferId, fileName, fileSize) { await this.sendFileTransferPacket(nodeId, { offerFileTransfer: { id: fileTransferId, diff --git a/src/js/FileTransferrer.js b/src/js/FileTransferrer.js index 7c8ec8d..71fe40f 100644 --- a/src/js/FileTransferrer.js +++ b/src/js/FileTransferrer.js @@ -48,11 +48,11 @@ class FileTransferrer { // add to file transfers list GlobalState.fileTransfers.push(fileTransfer); - // send file transfer request + // send file transfer offer for(var attempt = 1; attempt <= this.MAX_PACKET_ATTEMPTS; attempt++){ try { this.log(`offerFileTransfer attempt ${attempt}`); - await FileTransferAPI.sendFileTransferRequest(to, fileTransferId, fileName, fileSize); + await FileTransferAPI.offerFileTransfer(to, fileTransferId, fileName, fileSize); this.log(`offerFileTransfer attempt ${attempt} success`); return; } catch(e) {