1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-06 03:50:04 +02:00

Update socket

This commit is contained in:
Daniel Neto 2024-10-07 12:23:54 -03:00
parent 251e5740f0
commit a2380e37bd
4 changed files with 51 additions and 19 deletions

View file

@ -415,6 +415,7 @@ class Message implements MessageComponentInterface {
public function onError(ConnectionInterface $conn, \Exception $e) {
dbDeleteConnection($conn->resourceId);
_error_log("resourceId={$conn->resourceId} close on line ".__LINE__);
$conn->close();
}
@ -500,6 +501,7 @@ class Message implements MessageComponentInterface {
if($client['time']+$this->disconnectAfter < $time){
//_error_log("resourceId={$client['resourceId']} is too old, close it");
if(!empty($this->clients[$client['resourceId']])){
_error_log("resourceId={$client['resourceId']} close on line ".__LINE__);
$this->clients[$client['resourceId']]->close();
}
unset($this->clients[$client['resourceId']]);