mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-06 03:50:04 +02:00
Update socket
This commit is contained in:
parent
251e5740f0
commit
a2380e37bd
4 changed files with 51 additions and 19 deletions
|
@ -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']]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue