mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-03 08:39:53 +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(){
|
public function close(){
|
||||||
return $this->socket->close();
|
return $this->socket->close(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getStruct($pid){
|
protected function getStruct($pid){
|
||||||
|
@ -62,9 +62,7 @@ class UDPSocket{
|
|||||||
|
|
||||||
public function close($error = 125){
|
public function close($error = 125){
|
||||||
$this->connected = false;
|
$this->connected = false;
|
||||||
if($error === false){
|
if($error !== false){
|
||||||
console("[ERROR] [Socket] Socket closed, Error: End of Stream");
|
|
||||||
}else{
|
|
||||||
console("[ERROR] [Socket] Socket closed, Error $error: ".socket_strerror($error));
|
console("[ERROR] [Socket] Socket closed, Error $error: ".socket_strerror($error));
|
||||||
}
|
}
|
||||||
return @socket_close($this->sock);
|
return @socket_close($this->sock);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user