diff --git a/include/haproxy/protocol-t.h b/include/haproxy/protocol-t.h index ae7ec1975..f2aa4affe 100644 --- a/include/haproxy/protocol-t.h +++ b/include/haproxy/protocol-t.h @@ -106,7 +106,6 @@ struct protocol { /* functions acting on connections */ void (*accept)(int fd); /* generic accept function */ int (*connect)(struct connection *, int flags); /* connect function if any, see below for flags values */ - int (*drain)(int fd); /* indicates whether we can safely close the fd */ struct list receivers; /* list of receivers using this protocol (under proto_lock) */ int nb_receivers; /* number of receivers (under proto_lock) */ diff --git a/src/connection.c b/src/connection.c index 9c017bcf9..1274112d8 100644 --- a/src/connection.c +++ b/src/connection.c @@ -420,12 +420,6 @@ int conn_sock_drain(struct connection *conn) if (!fd_recv_ready(conn->handle.fd)) return 0; - if (conn->ctrl->drain) { - if (conn->ctrl->drain(conn->handle.fd) <= 0) - return 0; - goto shut; - } - /* no drain function defined, use the generic one */ while (turns) {