An attempt to fix socket's behavior inconsistencies across platforms.

Added an option to override minimum socket's timeout to prevent getting timeouts on high latency networks.
This commit is contained in:
ANR2ME authored and Henrik Rydgård committed 2020-07-22 16:46:34 +02:00
1 parent d9756e9231
commit d0045947f1
8 files changed
+115 -19

No files matched your search

+2
View File
@@ -104,6 +104,7 @@ bool PortManager::Init(const unsigned int timeout) {
break;
}
}
m_leaseDuration = "43200"; // 12 hours
m_InitState = UPNP_INITSTATE_BUSY;
urls = (UPNPUrls*)malloc(sizeof(struct UPNPUrls));
@@ -165,6 +166,7 @@ bool PortManager::Init(const unsigned int timeout) {
RefreshPortList();
return true;
}
ERROR_LOG(SCENET, "PortManager - upnpDiscover failed (error: %i) or No UPnP device detected", error);
auto n = GetI18NCategory("Networking");
host->NotifyUserMessage(n->T("Unable to find UPnP device"), 6.0f, 0x0000ff);