Skip to content

Fix: writing to socket throws PHP notice when the socket has been closed by the server

Compare
Choose a tag to compare
@Namoshek Namoshek released this 15 Feb 09:03
· 12 commits to 0.1 since this release
359c5e2

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().