From: Willy Tarreau Date: Thu, 15 Oct 2020 06:23:57 +0000 (+0200) Subject: MINOR: connection: add new error codes for accept_conn() X-Git-Tag: v2.3-dev7~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=65ed143841384840485441057eb33d036511733f;p=thirdparty%2Fhaproxy.git MINOR: connection: add new error codes for accept_conn() accept_conn() will be used to accept an incoming connection and return it. It will have to deal with various error codes. The currently identified ones were created as CO_AC_*. --- diff --git a/include/haproxy/connection-t.h b/include/haproxy/connection-t.h index 41d50cc112..d096f53ef9 100644 --- a/include/haproxy/connection-t.h +++ b/include/haproxy/connection-t.h @@ -243,6 +243,16 @@ enum { CO_ER_SOCKS4_ABORT, /* SOCKS4 Proxy handshake aborted by server */ }; +/* error return codes for accept_conn() */ +enum { + CO_AC_NONE = 0, /* no error, valid connection returned */ + CO_AC_DONE, /* reached the end of the queue (typically EAGAIN) */ + CO_AC_RETRY, /* late signal delivery or anything requiring the caller to try again */ + CO_AC_YIELD, /* short-lived limitation that requires a short pause */ + CO_AC_PAUSE, /* long-lived issue (resource/memory allocation error, paused FD) */ + CO_AC_PERMERR, /* permanent, non-recoverable error (e.g. closed listener socket) */ +}; + /* source address settings for outgoing connections */ enum { /* Tproxy exclusive values from 0 to 7 */