]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: ssl: do not call directly the conn_fd_handler from async_fd_handler
authorEmeric Brun <ebrun@haproxy.com>
Fri, 2 Jun 2017 15:54:06 +0000 (15:54 +0000)
committerWilly Tarreau <w@1wt.eu>
Thu, 8 Jun 2017 04:47:34 +0000 (06:47 +0200)
This patch modifies the way to re-enable the connection from the async fd
handler calling conn_update_sock_polling instead of the conn_fd_handler.

It also ensures that the polling is really stopped on the async fd.

src/ssl_sock.c

index f9b236a8f7cc2af46fc74cc7b5492d4366e160d4..af09cfba2fcaa4c73d42ca8bd225128e8ffd6b05 100644 (file)
@@ -369,17 +369,19 @@ fail_get:
 static void ssl_async_fd_handler(int fd)
 {
        struct connection *conn = fdtab[fd].owner;
-       int conn_fd = conn->t.sock.fd;
 
        /* fd is an async enfine fd, we must stop
         * to poll this fd until it is requested
         */
+        fd_stop_recv(fd);
         fd_cant_recv(fd);
 
        /* crypto engine is available, let's notify the associated
         * connection that it can pursue its processing.
         */
-       conn_fd_handler(conn_fd);
+       __conn_sock_want_recv(conn);
+       __conn_sock_want_send(conn);
+       conn_update_sock_polling(conn);
 }
 
 /*