http: Save last-used port.

This is necessary for better caching, in case you share often.
This commit is contained in:
Unknown W. Brackets committed 2016-07-03 22:13:54 -07:00
1 parent 66479add92
commit c3e70c11f8
3 files changed
+10 -2

No files matched your search

+4 -1
View File
@@ -155,9 +155,12 @@ static void ExecuteServer() {
http->RegisterHandler(pair.first.c_str(), handler);
}
http->Listen(0);
if (!http->Listen(g_Config.iRemoteISOPort)) {
http->Listen(0);
}
UpdateStatus(ServerStatus::RUNNING);
g_Config.iRemoteISOPort = http->Port();
RegisterServer(http->Port());
double lastRegister = real_time_now();
while (RetrieveStatus() == ServerStatus::RUNNING) {