On 2013/10/11 14:10, Willy Tarreau wrote:
Hi Godbach,

Yes I remember about this change, it happened one year ago in the
following commit :

   ed7f836 BUG/MINOR: stream_interface: don't loop over ->snd_buf()

In 1.4 and 1.5 before the connection rework, the loop was used to
call send() over each buffer's half (when data was wrapped around
at the end). Now the transport protocol's send() function does the
job and we don't need to loop anymore.

However, I left the code as is because not having to replace the
breaks by gotos etc... reduced the amount of changes at the time
(we were at a stage where the new connections were not completely
stabilized yet).

Now it's OK. Feel free to send a cleanup patch if you want (and
change the comment at the top of the loop).

Best regards,
Willy



Hi Willy,

Thank you.

Yes, if 'while' is replaced by 'if', the breaks should be processed carefully.

I will send a cleanup patch later. The function name may be also changed from si_conn_send_loop() to si_conn_send() in my opinion, and the codes int two lines which call this function will be also modified.

--
Best Regards,
Godbach

Reply via email to