You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classBase {
publicfunction__destruct() {
if ($this->socket) {
if (get_resource_type($this->socket) === 'stream') fclose($this->socket);
$this->socket = null;
}
}
}
PHP Warning: fwrite() expects parameter 1 to be resource, null given in vendor/textalk/websocket/lib/Base.php on line 251
PHP Fatal error: Uncaught exception 'WebSocket\ConnectionException' with message 'Could only write out of 557 bytes.' in vendor/textalk/websocket/lib/Base.php:256
I have encountered an object destructing and attempting to send a message after WebSocket/Client's destructor (It's an Error notification system)..
would be nice to have a 'destruct' : false (default: true) option to not close the socket / don't set to null in __destruct
publicfunction__destruct() {
if ($this->options['destruct'] && $this->socket) {
if (get_resource_type($this->socket) === 'stream') fclose($this->socket);
$this->socket = null;
}
}
The text was updated successfully, but these errors were encountered:
https://github.com/Textalk/websocket-php/blob/master/lib/Client.php#L37
class Client extends Base
PHP Warning: fwrite() expects parameter 1 to be resource, null given in vendor/textalk/websocket/lib/Base.php on line 251
PHP Fatal error: Uncaught exception 'WebSocket\ConnectionException' with message 'Could only write out of 557 bytes.' in vendor/textalk/websocket/lib/Base.php:256
I have encountered an object destructing and attempting to send a message after WebSocket/Client's destructor (It's an Error notification system)..
would be nice to have a
'destruct' : false
(default: true) option to not close the socket / don't set to null in __destructThe text was updated successfully, but these errors were encountered: