From dae69754986406e187ebc3b99aedb0ccc5c4a466 Mon Sep 17 00:00:00 2001 From: Olivier Houchard Date: Sun, 14 Mar 2021 00:39:49 +0100 Subject: [PATCH] MINOR: muxes: garbage collect the reset() method. Now that connections aren't being reused when they failed, remove the reset() method. It was unimplemented anywhere, except for H1 where it did nothing, anyway. --- include/haproxy/connection-t.h | 1 - src/mux_h1.c | 6 ------ 2 files changed, 7 deletions(-) diff --git a/include/haproxy/connection-t.h b/include/haproxy/connection-t.h index 4635700d6..c5d98e720 100644 --- a/include/haproxy/connection-t.h +++ b/include/haproxy/connection-t.h @@ -417,7 +417,6 @@ struct mux_ops { int (*avail_streams)(struct connection *conn); /* Returns the number of streams still available for a connection */ int (*used_streams)(struct connection *conn); /* Returns the number of streams in use on a connection. */ void (*destroy)(void *ctx); /* Let the mux know one of its users left, so it may have to disappear */ - void (*reset)(struct connection *conn); /* Reset the mux, because we're re-trying to connect */ int (*ctl)(struct connection *conn, enum mux_ctl_type mux_ctl, void *arg); /* Provides information about the mux */ int (*takeover)(struct connection *conn, int orig_tid); /* Attempts to migrate the connection to the current thread */ unsigned int flags; /* some flags characterizing the mux's capabilities (MX_FL_*) */ diff --git a/src/mux_h1.c b/src/mux_h1.c index 097259873..3c80e85f7 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -2867,11 +2867,6 @@ struct task *h1_io_cb(struct task *t, void *ctx, unsigned int state) return t; } -static void h1_reset(struct connection *conn) -{ - -} - static int h1_wake(struct connection *conn) { struct h1c *h1c = conn->ctx; @@ -3849,7 +3844,6 @@ static const struct mux_ops mux_h1_ops = { .shutr = h1_shutr, .shutw = h1_shutw, .show_fd = h1_show_fd, - .reset = h1_reset, .ctl = h1_ctl, .takeover = h1_takeover, .flags = MX_FL_HTX,