]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[MEDIUM] split stream_sock_process_data
authorWilly Tarreau <w@1wt.eu>
Thu, 28 Aug 2008 06:54:27 +0000 (08:54 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 2 Nov 2008 09:19:06 +0000 (10:19 +0100)
commit3a16b2c9cd672f2f2b32f5dd267e0e22f02c18bc
treee634fd53c15736e9775f6c0ea428bb7cfb666192
parentf9839bdffe0856effd324e60dd49f87d9f597c6d
[MEDIUM] split stream_sock_process_data

It was a waste to constantly update the file descriptor's status
and timeouts during a flags update. So stream_sock_process_data
has been slit in two parts :
  stream_sock_data_update()  => computes updated flags
  stream_sock_data_finish()  => computes timeouts

Only the first one is called during flag updates. The second one
is only called upon completion. The number of calls to fd_set/fd_clr
has now significantly dropped.

Also, it's useless to check for errors and timeouts in the
process_session() loop, it's enough to check for them at the
beginning.
include/proto/stream_sock.h
include/types/buffers.h
src/proto_http.c
src/stream_sock.c