Navigation Menu

Skip to content

Commit

Permalink
Fixed|Server: Server's port not included in master server announcement
Browse files Browse the repository at this point in the history
In case the local IP address was not determined and "net-ip-address"
was not set, the server's port was omitted from the master server
announcement.

IssueID #2277
  • Loading branch information
skyjake committed Sep 30, 2018
1 parent 1fcff2a commit c6c64af
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doomsday/apps/server/src/serverapp.cpp
Expand Up @@ -315,6 +315,10 @@ shell::ServerInfo ServerApp::currentServerInfo()
info.setMap(mapPath);
}

// The master server will use the public IP address where an announcement came from,
// so we don't necessarily have to specify a valid address. The port is required, though.
info.setAddress({"localhost", duint16(nptIPPort)});

// This will only work if the server has a public IP address.
QHostInfo const host = QHostInfo::fromName(QHostInfo::localHostName());
foreach (QHostAddress hostAddr, host.addresses())
Expand Down

0 comments on commit c6c64af

Please sign in to comment.