mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +00:00
Fixed the Socket error at close
This commit is contained in:
parent
1152c24bdf
commit
b589b69beb
@ -46,7 +46,7 @@ class MinecraftInterface{
|
||||
}
|
||||
|
||||
public function close(){
|
||||
return $this->socket->close();
|
||||
return $this->socket->close(false);
|
||||
}
|
||||
|
||||
protected function getStruct($pid){
|
||||
|
@ -62,9 +62,7 @@ class UDPSocket{
|
||||
|
||||
public function close($error = 125){
|
||||
$this->connected = false;
|
||||
if($error === false){
|
||||
console("[ERROR] [Socket] Socket closed, Error: End of Stream");
|
||||
}else{
|
||||
if($error !== false){
|
||||
console("[ERROR] [Socket] Socket closed, Error $error: ".socket_strerror($error));
|
||||
}
|
||||
return @socket_close($this->sock);
|
||||
|
Loading…
x
Reference in New Issue
Block a user