http: Save last-used port.
This is necessary for better caching, in case you share often.
This commit is contained in:
parent
66479add92
commit
c3e70c11f8
3 changed files with 10 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue