mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
Server discovery bug fixes & error handling improvements
- Fixed concurrency bug that prevented players from connecting to servers - Discovery server can restart itself if it crashes - Added nicer error handling for server discovery. - Using AWS to get servers external IP address. Tags: #story[1281]
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package seng302.gameServer;
|
||||
|
||||
import seng302.discoveryServer.util.ServerListing;
|
||||
import seng302.discoveryServer.DiscoveryServerClient;
|
||||
import seng302.discoveryServer.util.ServerListing;
|
||||
|
||||
import javax.jmdns.JmDNS;
|
||||
import javax.jmdns.ServiceInfo;
|
||||
@@ -133,7 +133,7 @@ public class ServerAdvertiser {
|
||||
}
|
||||
}, 0);
|
||||
|
||||
ServerListing serverListing = new ServerListing(serverName, props.get("map"), getLocalHostIp(), portNo, Integer.parseInt(props.get("capacity")));
|
||||
ServerListing serverListing = new ServerListing(serverName, props.get("map"), new DiscoveryServerClient().getInetIp(), portNo, Integer.parseInt(props.get("capacity")));
|
||||
repositoryClient.register(serverListing);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user