Skip to content

Commit

Permalink
rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
liamcottle committed Dec 17, 2024
1 parent 22ee042 commit bd1c3d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/js/FileTransferAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/js/FileTransferrer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit bd1c3d4

Please sign in to comment.