Fix: writing to socket throws PHP notice when the socket has been closed by the server
Unfortunately, PHP will simply throw a PHP notice (which cannot be catched) when we use fwrite()
on a socket and the connection has been closed by the server. To leverage the already in place error handling of the MQTTClient
, we suppress potential PHP notices, warnings and errors when using fwrite()
.