]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: contrib/spoa_example: Don't reset the status code during disconnect
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 31 May 2018 13:59:32 +0000 (15:59 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 4 Jun 2018 15:34:50 +0000 (17:34 +0200)
When the connection is closed by HAProxy, the status code provided in the
DISCONNECT frame is lost. By retransmitting it in the agent's reply, we are sure
to have it in the SPOE logs.

This patch may be backported in 1.8.

contrib/spoa_example/spoa.c

index d7486a417aa5d96dda114ece2dda464173f3425d..7b40e81ed62082b781a95004da5a81d11c39512b 100644 (file)
@@ -1474,7 +1474,6 @@ read_frame_cb(evutil_socket_t fd, short events, void *arg)
                        if (client->status_code != SPOE_FRM_ERR_NONE)
                                LOG(client->worker, "<%lu> Peer closed connection: %s",
                                    client->id, spoe_frm_err_reasons[client->status_code]);
-                       client->status_code = SPOE_FRM_ERR_NONE;
                        goto disconnect;
        }