Skip to content

Commit

Permalink
Merge pull request #36 from stayintarkov/upnp-timeout-error
Browse files Browse the repository at this point in the history
upnp timeout error
================
Should help with most questions that we have about the prev Error
  • Loading branch information
mihaicm93 committed Mar 31, 2024
2 parents 4bb1145 + c40af4e commit 8a5639e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/upnp/UPNPHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ export class UPNPHelper {
Promise.all(new Array(akiPromise, sitWSPromise, natPromise, p2pPromise)).then((x) => {
console.log(`SIT: UPNP: Successfully mapped ${this.akiPort},${this.coopConfig.webSocketPort},${this.coopConfig.natHelperPort},6972`);
}).catch((rejectedReason) => {
console.log(`SIT: UPNP: Unable to Map: ${rejectedReason}`);
if (rejectedReason instanceof Error && rejectedReason.message.includes('Timeout')) {
console.log(`SIT: UPNP: UPnP request timed out. Ignore if port forwarding or direct connection is in place.`);
}
else {
console.log(`SIT: UPNP: Unable to Map: ${rejectedReason}`);
}
});
}

Expand Down

0 comments on commit 8a5639e

Please sign in to comment.