mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
Various bug fixes
- Fixed bug where an invalid port number would crash the program - Closed the stage before cleaning up resources. This speeds up closing the app. - Added error handling for when the client looses connection to the server. Tags: #story[1281]
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package seng302.gameServer;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import seng302.discoveryServer.DiscoveryServerClient;
|
||||
import seng302.discoveryServer.util.ServerListing;
|
||||
|
||||
@@ -38,6 +40,7 @@ public class ServerAdvertiser {
|
||||
private DiscoveryServerClient repositoryClient;
|
||||
|
||||
private Hashtable<String ,String> props;
|
||||
private Logger logger = LoggerFactory.getLogger(ServerAdvertiser.class);
|
||||
|
||||
private ServerAdvertiser() throws IOException{
|
||||
jmdnsInstance = JmDNS.create(InetAddress.getByName(getLocalHostIp()));
|
||||
@@ -128,7 +131,7 @@ public class ServerAdvertiser {
|
||||
try {
|
||||
jmdnsInstance.registerService(serviceInfo);
|
||||
} catch (IOException e) {
|
||||
System.out.println("Failed");
|
||||
logger.warn("Failed to register service info");
|
||||
}
|
||||
}
|
||||
}, 0);
|
||||
|
||||
Reference in New Issue
Block a user