walkor / phpsocket.io

A server side alternative implementation of socket.io in PHP based on workerman.
2.3k stars 508 forks source link

fread(): SSL: Connection reset by peer in #293

Closed den1a closed 5 months ago

den1a commented 1 year ago

Hello. I get this error from the logo. Please tell me what to pay attention to.

PHP Warning: fread(): SSL: Connection reset by peer in /var/www/site/vendor/workerman/workerman/Connection/TcpConnection.php on line 582

Certificate files are readable

'ssl' => [
  'local_cert'  => '/etc/nginx/ssl/www.site.crt',
  'local_pk'    => '/etc/nginx/ssl/www.site.crt',
  'verify_peer' => false,
]
walkor commented 1 year ago

It appears that the connection was forcibly terminated by the client, which is a predictable warning and usually does not require special handling In the workerman source code @ is used to suppress such warnings.

den1a commented 1 year ago

I see @ in the source code, but I still get a lot of errors in my error log

error

error2

acuna-public commented 5 months ago

@den1a it's not "a lot of errors", it's called stack trace showed where this error occur, so error only one here: "Connection reset by peer", it's just warning, so you can simply supress it as @walkor mentioned because it will recover automatically in case of disconnection.