Kim Alvefur <zash@zash.se> [Sun, 18 Jul 2021 09:08:04 +0200] rev 11708
mod_s2s: Guard against missing 'to' on incoming stream
Given an incoming <stream:stream from="example.com"> this line would
have mistakenly reported the 'from' as the local host. Neither are
technically required and may be missing, especially on connections used
only for Dialback.
Outgoing connections initiated by Prosody always have 'from_host' and
'to_host', so it is safer to check it this way.
Kim Alvefur <zash@zash.se> [Sun, 18 Jul 2021 08:53:37 +0200] rev 11707
net.server_epoll: Fix traceback-causing typo
Caused "attempt to index a string value (local 'data')", but only if
keep_buffers is set to false, which is not the default.
Introduced in 917eca7be82b
Kim Alvefur <zash@zash.se> [Sat, 17 Jul 2021 14:54:48 +0200] rev 11706
net.server_epoll: Ensure timeouts match epoll flags
Read and write timeouts should usually match whether we want to read or
write.
Kim Alvefur <zash@zash.se> [Sat, 17 Jul 2021 14:51:50 +0200] rev 11705
net.server_epoll: Skip reset of read timeout when not reading
Should avoid rare but needless timer interactions
Kim Alvefur <zash@zash.se> [Sat, 17 Jul 2021 14:06:57 +0200] rev 11704
net.server_epoll: Reduce timer churn during TLS handshake
Instead of removing and readding the timer, keep it and adjust it
instead. Should reduce garbage production a bit.
Kim Alvefur <zash@zash.se> [Fri, 16 Jul 2021 17:10:09 +0200] rev 11703
net.server_epoll: Use only fatal "write" timeout during TLS negotiation
Only real difference between the read and write timeouts is that the
former has a callback that allows the higher levels to keep the
connection alive, while hitting the later is immediately fatal. We want
the later behavior for TLS negotiation.
Kim Alvefur <zash@zash.se> [Fri, 16 Jul 2021 15:40:08 +0200] rev 11702
net.server_epoll: Optimize concatenation of exactly 2 buffer chunks
Saves a function call. I forget if I measured this kind of thing but
IIRC infix concatenation is faster than a function call up to some
number of items, but let's stop at 2 here.
Kim Alvefur <zash@zash.se> [Fri, 16 Jul 2021 15:38:38 +0200] rev 11701
net.server_epoll: Avoid allocating a buffer table for single writes
writebuffer is now string | { string }
Saves the allocation of a buffer table until the second write, which
could be rare, especially with opportunistic writes.
Kim Alvefur <zash@zash.se> [Fri, 16 Jul 2021 02:28:32 +0200] rev 11700
net.server_epoll: Optionally let go of buffers
Reusing an already existing buffer table would reduce garbage, but
keeping it while idle is a waste.
Kim Alvefur <zash@zash.se> [Fri, 16 Jul 2021 01:21:05 +0200] rev 11699
net.server_epoll: Propagate returns from opportunistic writes
So that if a write ends up writing directly to the socket, it gets the
actual return value