connection_write_to_buf: indirect recursion for CONN_TYPE_CONTROL
Call of connection_write_to_buf
for CONN_TYPE_CONTROL allows immediate flush of the outbuf. Then if code tries to log something and control_event_logmsg
is involved then it call of connection_write_to_buf
recursively. Consequence calls blocked by ++disable_log_messages
only then.
Three ways to fix:
- Remove ability for immediate flush of the outbuf by
connection_write_to_buf
- Check
in_connection_handle_write
flag at start ofconnection_handle_write
- Guard call of
connection_handle_write
bydisable_control_logging
andenable_control_logging
Every way have negative and positive impacts.