]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
login-*: Make sure "need to write more" flag doesn't get stuck during handshake.
authorTimo Sirainen <tss@iki.fi>
Wed, 11 Dec 2013 17:39:12 +0000 (19:39 +0200)
committerTimo Sirainen <tss@iki.fi>
Wed, 11 Dec 2013 17:39:12 +0000 (19:39 +0200)
This should prevent busy-looping in SSL_accept(). (Second attempt at doing
this, first one was in e95479f439aa.)

src/login-common/ssl-proxy-openssl.c

index 4ebbfd3dc2f40d8f2499ecd30c80031f5df05e41..551e8e2bdf155b42292f4c53b03b177b2e6e0d33 100644 (file)
@@ -539,8 +539,10 @@ static void ssl_step(struct ssl_proxy *proxy)
 {
        proxy->refcount++;
 
-       if (!proxy->handshaked)
+       if (!proxy->handshaked) {
+               ssl_set_io(proxy, SSL_REMOVE_OUTPUT);
                ssl_handshake(proxy);
+       }
 
        if (proxy->handshaked) {
                if (proxy->plainout_size == sizeof(proxy->plainout_buf))