Description
Describe the bug
one call it works, next call not... i searched for a reason but cannot find.
Its the check function if connection exists.
Should it end in an fatal error if connection really refused?
Error Log
PHP Fatal error: Uncaught ErrorException: stream_socket_client(): Unable to connect to tcp://xxx.xx.xxx.xx:18804 (Connection refused) in /www/htdocs/w01/domain.com/vendor/textalk/websocket/lib/Client.php:350
Stack trace:
#0 [internal function]: Phrity\Util\ErrorHandler->Phrity\Util{closure}(2, 'stream_socket_c...', '/www/htdocs/w01...', 350)
#1 /www/htdocs/w01/domain.com/vendor/textalk/websocket/lib/Client.php(350): stream_socket_client('tcp://xxx.xx.xx...', 0, '', 5, 4, Resource id #57)
#2 /www/htdocs/w01/domain.com/vendor/phrity/util-errorhandler/src/Phrity/Util/ErrorHandler.php(60): WebSocket\Client->WebSocket{closure}()
#3 /www/htdocs/w01/domain.com/vendor/textalk/websocket/lib/Client.php(347): Phrity\Util\ErrorHandler->with(Object(Closure))
#4 /www/htdocs/w01/domain.com/vendor/textalk/websocket/lib/Client.php(169): WebSocket\Client->connect()
#5 /www/htdocs/w01/domain.com/cron/class.import.php(903): WebSocket\Client->send('{"type":"LABEL"...')
#6 /www/htdocs/w01/domain.com/includes/create_label.php(794): labelprint('files/dhl_label...', '18804')
#7 /www/htdocs/w01/domain.com/picklist_save.php(355): create_dhl_label(Array, Array, Array, 0.488, true, false)
#8 {main}
Next WebSocket\ConnectionException: Could not open socket to "xxx.xx.xxx.xx:18804": stream_socket_client(): Unable to connect to tcp://xxx.xx.xxx.xx:18804 (Connection refused) (0). in /www/htdocs/w01/picker.sendagents.com/vendor/textalk/websocket/lib/Client.php:365
Stack trace:
#0 /www/htdocs/w01/domain.com/vendor/textalk/websocket/lib/Client.php(169): WebSocket\Client->connect()
#1 /www/htdocs/w01/domain.com/cron/class.import.php(903): WebSocket\Client->send('{"type":"LABEL"...')
#2 /www/htdocs/w01/domain.com/includes/create_label.php(794): labelprint('files/dhl_label...', '18804')
#3 /www/htdocs/w01/domain.com/picklist_save.php(355): create_dhl_label(Array, Array, Array, 0.488, true, false)
#4 {main}
thrown in /www/htdocs/w01/domain.com/vendor/textalk/websocket/lib/Client.php on line 365
Versions
- Version of this library: 1.6.3
- PHP version: 8.2.9