mirror of
https://github.com/moonlight-stream/Internet-Hosting-Tool.git
synced 2025-07-03 08:15:40 +00:00
Use indefinite mappings if the IGD returns unexpected error codes
This commit is contained in:
parent
47d60b9f24
commit
df286ef56d
@ -96,6 +96,9 @@ bool UPnPMapPort(struct UPNPUrls* urls, struct IGDdatas* data, int proto, const
|
||||
// NoSuchEntryInArray
|
||||
printf("NOT FOUND" NL);
|
||||
}
|
||||
else if (err == 606) {
|
||||
printf("UNAUTHORIZED" NL);
|
||||
}
|
||||
else if (err == UPNPCOMMAND_SUCCESS) {
|
||||
// Some routers change the description, so we can't check that here
|
||||
if (!strcmp(intClient, myAddr)) {
|
||||
@ -151,6 +154,10 @@ bool UPnPMapPort(struct UPNPUrls* urls, struct IGDdatas* data, int proto, const
|
||||
}
|
||||
else {
|
||||
printf("ERROR %d (%s)" NL, err, strupnperror(err));
|
||||
|
||||
// If we get a strange error from the router, we'll assume it's some old broken IGDv1
|
||||
// device and only use indefinite lease durations to hopefully avoid confusing it.
|
||||
indefinite = true;
|
||||
}
|
||||
|
||||
// Bail if GameStream is disabled
|
||||
|
Loading…
x
Reference in New Issue
Block a user