]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: check: Fix checks when using SRV records.
authorOlivier Houchard <ohouchard@haproxy.com>
Fri, 4 Aug 2017 16:39:01 +0000 (18:39 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 9 Aug 2017 14:32:50 +0000 (16:32 +0200)
When started, a server may not yet have an associated protocol, so don't
bother trying to run the checks until it is there.

src/checks.c

index 7938b873021c31b7bb3ba21c1287e2b0308fa8b0..fc92a2438870b2525ef54991babcbdee27849ff7 100644 (file)
@@ -1557,7 +1557,7 @@ static int connect_conn_chk(struct task *t)
        }
 
        ret = SF_ERR_INTERNAL;
-       if (proto->connect)
+       if (proto && proto->connect)
                ret = proto->connect(conn, check->type, quickack ? 2 : 0);
        if (s->check.send_proxy && !(check->state & CHK_ST_AGENT)) {
                conn->send_proxy_ofs = 1;