mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
Fixed the Socket error at close
This commit is contained in:
parent
1152c24bdf
commit
b589b69beb
2 changed files with 2 additions and 4 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue