]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: session: fix some leftover from debug code
authorWilly Tarreau <w@1wt.eu>
Fri, 12 Oct 2012 15:36:40 +0000 (17:36 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 12 Oct 2012 15:36:40 +0000 (17:36 +0200)
Commit 82569f91 moved the health and monitor-net checks to session.c
but a debug test introduced 0& to disable MSG_DONTWAIT in the recv()
call and this debug code remained there. Since the socket is marked
non-blocking, there should be no effect but it's dangerous to keep
such a thing here.

src/session.c

index 3fcce844a043da96b013bfa98c0c163dddcdce19..1d5514e3d52b026aadb2b2f1857c0b373cea8ba5 100644 (file)
@@ -151,7 +151,7 @@ int session_accept(struct listener *l, int cfd, struct sockaddr_storage *addr)
                 *  - HEALTH mode without HTTP check => just send "OK"
                 *  - TCP mode from monitoring address => just close
                 */
-               recv(cfd, trash, trashlen, 0&MSG_DONTWAIT);
+               recv(cfd, trash, trashlen, MSG_DONTWAIT);
                if (p->mode == PR_MODE_HTTP ||
                    (p->mode == PR_MODE_HEALTH && (p->options2 & PR_O2_CHK_ANY) == PR_O2_HTTP_CHK))
                        send(cfd, "HTTP/1.0 200 OK\r\n\r\n", 19, MSG_DONTWAIT|MSG_NOSIGNAL|MSG_MORE);