]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: proto_reverse_connect: refactor preconnect failure
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 22 Sep 2023 14:28:35 +0000 (16:28 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 22 Sep 2023 14:43:36 +0000 (16:43 +0200)
commit1f43fb71be0cda9132668de5cc01eafb02d371d4
tree15837a87b846d406b6771b3936fb572d3a5ed0ec
parenta37abee26658e1d1e8e36d8c9e585d2edce3f6d6
MINOR: proto_reverse_connect: refactor preconnect failure

When a connection is freed during preconnect before reversal, the error
must be notified to the listener to remove any connection reference and
rearm a new preconnect attempt. Currently, this can occur through 2 code
paths :
* conn_free() called directly by H2 mux
* error during conn_create_mux(). For this case, connection is flagged
  with CO_FL_ERROR and reverse_connect task is woken up. The process
  task handler is then responsible to call conn_free() for such
  connection.

Duplicated steps where done both in conn_free() and process task
handler. These are now removed. To facilitate code maintenance,
dedicated operation have been centralized in a new function
rev_notify_preconn_err() which is called by conn_free().
include/haproxy/proto_reverse_connect.h
src/connection.c
src/proto_reverse_connect.c