]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: lua: do not allocate the remote connection anymore
authorWilly Tarreau <w@1wt.eu>
Thu, 18 Jul 2019 16:01:14 +0000 (18:01 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 19 Jul 2019 11:50:09 +0000 (13:50 +0200)
commit5a0b25d31c2bd003caec8e2abb1bdb03b4ba607e
tree09239e35f0184ce92865a0d81214f72c6c3b84b9
parent02efedac0c714640f10bcc6d63c87daf87a06758
MEDIUM: lua: do not allocate the remote connection anymore

Lua cosockets do not need to allocate the remote connection anymore.
However this was trickier than expected because some tests were made
on this remote connection's existence to detect establishment instead
of relying on the stream interface's state (which is how it's now done).
The flag SF_ADDR_SET was set a bit too early (before assigning the
address) so this was moved to the right place. It should not have had
any impact beyond confusing debugging.

The only remaining occurrence of the remote connection knowledge now
is for getsockname() which requires to access the connection to send
the syscall, and it's unlikely that we'll need to change this before
QUIC or so.
src/hlua.c