RCONInstance: terminate session on ECONNRESET errors

This commit is contained in:
Dylan K. Taylor 2018-06-24 17:31:18 +01:00
parent 8dae497610
commit 6b2250cbce

View File

@ -84,6 +84,9 @@ class RCONInstance extends Thread{
if($this->stop){
return false;
}elseif($d === false){
if(socket_last_error($client) === SOCKET_ECONNRESET){ //client crashed, terminate connection
return false;
}
return null;
}elseif($d === "" or strlen($d) < 4){
return false;