mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 00:07:30 +00:00
UPnP: Fixed server crash on failure to find UPnP device
https://crash.pmmp.io/view/5241010
This commit is contained in:
parent
c7e9138994
commit
81d5598e96
@ -50,9 +50,9 @@ final class UPnPNetworkInterface implements NetworkInterface{
|
||||
|
||||
public function start() : void{
|
||||
$this->logger->info("Attempting to portforward...");
|
||||
$this->serviceURL = UPnP::getServiceUrl();
|
||||
|
||||
try{
|
||||
$this->serviceURL = UPnP::getServiceUrl();
|
||||
UPnP::portForward($this->serviceURL, Internet::getInternalIP(), $this->port, $this->port);
|
||||
$this->logger->info("Forwarded $this->ip:$this->port to external port $this->port");
|
||||
}catch(UPnPException $e){
|
||||
|
Loading…
x
Reference in New Issue
Block a user