]> git.kaiwu.me - nginx.git/commit
Mail: fixed handling of blocked client read events in proxy.
authorMaxim Dounin <mdounin@mdounin.ru>
Thu, 23 Mar 2023 23:53:21 +0000 (02:53 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Thu, 23 Mar 2023 23:53:21 +0000 (02:53 +0300)
commit2ca4355bf02ab454d6f216dab142816a626d7547
tree34ef1c779081a561ee795846a18a4299b7226049
parent11ed95bb53210c322c16bb0897f0cb3b5726ed57
Mail: fixed handling of blocked client read events in proxy.

When establishing a connection to the backend, nginx blocks reading
from the client with ngx_mail_proxy_block_read().  Previously, such
events were lost, and in some cases this resulted in connection hangs.

Notably, this affected mail_imap_ssl.t on Windows, since the test
closes connections after requesting authentication, but without
waiting for any responses (so the connection close events might be
lost).

Fix is to post an event to read from the client after connecting to
the backend if there were blocked events.
src/mail/ngx_mail_proxy_module.c