]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: connection: don't call the data->init callback upon error
authorWilly Tarreau <w@1wt.eu>
Wed, 3 Oct 2012 19:20:21 +0000 (21:20 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 4 Oct 2012 20:26:10 +0000 (22:26 +0200)
We don't call ->init() anymore upon error since we already call ->wake().

src/connection.c

index e156366f2b924a6b495d0b7aae6eb6fc102516c3..40a24ee671d92fc0e9674f98ba4008c7e4dfaaae 100644 (file)
@@ -114,15 +114,6 @@ int conn_fd_handler(int fd)
        }
 
  leave:
-       /* we may need to release the connection which is an embryonic session
-        * in case of failure. For this we use the init callback which will
-        * detect the error and clean everything up.
-        */
-       if ((conn->flags & (CO_FL_ERROR|CO_FL_INIT_DATA)) == (CO_FL_ERROR|CO_FL_INIT_DATA)) {
-               conn->data->init(conn);
-               return 0;
-       }
-
        /* The wake callback may be used to process a critical error and abort the
         * connection. If so, we don't want to go further as the connection will
         * have been released and the FD destroyed.