[Dovecot] imap-login hanging when firewall blocks ssl handshaking

Timo Sirainen tss at iki.fi
Thu Nov 29 22:43:42 EET 2012


On 29.11.2012, at 17.42, Erik A Johnson wrote:

> No, the test to bug out doesn't work because net_geterror(proxy->fd_ssl) returns 0 in the statement
> 
>   if (!proxy->client_proxy &&
>       net_geterror(proxy->fd_ssl) == ENOTCONN) {
> 
> However, errno is indeed ENOTCONN.  Changing the test to
> 
>   if (!proxy->client_proxy &&
>       errno == ENOTCONN) {

This change isn't very reliable, since the previous call might not have been read().. I wonder if something like would work:

if (!proxy->client && read(proxy->fd_ssl, &err, 0) < 0 && errno == ENOTCONN) {





More information about the dovecot mailing list