Crash fix

This commit is contained in:
Anuken
2018-09-03 10:29:44 -04:00
parent 3d4c2a2c20
commit bb59f45ba6
2 changed files with 7 additions and 4 deletions

View File

@@ -132,8 +132,10 @@ public class KryoServer implements ServerProvider {
//this only opens the default port due to security concerns (?)
if(port == Vars.port){
async(() -> {
if(!UPnP.isMappedTCP(port)) UPnP.openPortTCP(port);
if(!UPnP.isMappedUDP(port)) UPnP.openPortUDP(port);
try{
if(!UPnP.isMappedTCP(port)) UPnP.openPortTCP(port);
if(!UPnP.isMappedUDP(port)) UPnP.openPortUDP(port);
}catch(Throwable ignored){}
});
}