Replace socket_handler::fill_buffer() recursion with loop (#8389) master
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Wed, 16 Mar 2022 08:13:00 +0000 (09:13 +0100)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Wed, 16 Mar 2022 08:13:00 +0000 (09:13 +0100)
commit6f59dcf596103d0bc69be841627cd9926faa4139
tree3eeee83f32c22bc3a424d50f2633f46e1077b203
parenta63e08b83794273da3840e0b8bf15bf0085fe3c4
Replace socket_handler::fill_buffer() recursion with loop (#8389)

The loop is more stack friendly and also limited to 32 iterations
to prevent starvation of other connections.

Remove bogus "try_again" logic: The flag was set in "nbytes < 0",
but checked when "nbytes == 0" down below -> it probably never worked,
at least not how it was designed to work.
src/socket_handler.cpp