Skip to content

PHP Warning stream_set_timeout() expects parameter 1 to be resource, bool given after connection issue #170

@dartrax

Description

@dartrax

Describe the bug
Most of the time it works as expected. But, from time to time I see this warnings:

PHP Warning: stream_socket_client(): SSL: Connection reset by peer in /var/www/vhosts/.../imap_idle/Connection/Protocols/Protocol.php on line 191 PHP Warning: stream_socket_client(): Failed to enable crypto in /var/www/vhosts/.../imap_idle/Connection/Protocols/Protocol.php on line 191 PHP Warning: stream_socket_client(): unable to connect to ssl://wipper.bitpalast.net:993 (Unknown error) in /var/www/vhosts/.../imap_idle/Connection/Protocols/Protocol.php on line 191 PHP Warning: stream_set_timeout() expects parameter 1 to be resource, bool given in /var/www/vhosts/.../imap_idle/Connection/Protocols/Protocol.php on line 193 

Used config
default config.

Expected behavior
A way to handle this warning like trying to reopen the connection?
At least I think $stream should be checked (like in Line 195) before stream_set_timeout is called in Line 193.

Desktop / Server (please complete the following information):
PHP v 7.4.20
Version v 2.7.1

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions