]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MAJOR: always clear the CO_FL_WAIT_* flags after updating polling flags
authorWilly Tarreau <w@1wt.eu>
Mon, 5 Nov 2012 19:00:43 +0000 (20:00 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 9 Nov 2012 21:09:33 +0000 (22:09 +0100)
commitc9f7804aad77567c3a533dd654c1ffe6f910bb55
treea977e9d15c7fdb050015c255adb25299273a1065
parentc8dd77fddfbcbe2680fdcf23162f0ddf8ad61449
BUG/MAJOR: always clear the CO_FL_WAIT_* flags after updating polling flags

The CO_FL_WAIT_* flags were not cleared after updating polling flags.
This means that any caller of these functions that did not clear it
would enable polling instead of speculative I/O. This happens during
the stream interface update call which is performed from the session
handler for example.

As of now it's not a problem yet because speculative I/O and polling
are handled the same way. However with upcoming changes it does cause
some deadlocks because enabling read processing on a file descriptor
where everything was already read will do nothing until something new
happens on this FD.

The correct fix consists in clearing the flags while leaving the update
functions.

This fix does not need any backport as it was introduced with recent
connection changes (dev12) and not triggered until last commit.
src/connection.c