Kim Alvefur
869581384d
net: Prefix module imports with prosody namespace
3 years ago
Kim Alvefur
b79cb49bfb
net.connect: Clear TODO for Happy Eyeballs / RFC 8305, close #1246
...
Gotta have the DOAP references!
3 years ago
Kim Alvefur
9e8e910f1e
net.connect: Fix accumulation of connection attempt references
...
Connection attempts that failed the Happy Eyeballs race were not
unreferenced and would accumulate.
Tested by inspecting the 'pending_connections_map' after establishing
s2s with a s2s target where the IPv6 port has a -j DROP rule causing it
to time out and the IPv4 attempt wins the race.
Expected is that the losing connection stays around until net.server
timeouts kick in where it should be removed. The map table should tend
towards being empty during idle times.
4 years ago
Kim Alvefur
9f1af0be2e
net.connect: Allow passing TLS context from resolver
...
Only allowing it to be passed directly makes it hard to combine plain
(i.e. starttls) and Direct TLS connections in the same connection
resolution procedure. But now we can, using chained resolvers!
4 years ago
Kim Alvefur
068388d9c7
net.connect: Prefer last connection error over last resolver error
...
E.g. "connection refused" over one IP version instead of NoError for the
other IP version.
4 years ago
Kim Alvefur
93121127fa
net.connect: Propagate last error message from resolvers
...
Previously it would only say "unable to resolve server" for all DNS
problems. While "NoError in A lookup" might not make much sense to
users, it should help in debugging more than the previous generic error.
Friendlier errors will be future work.
4 years ago
Kim Alvefur
7b89ab9b86
net.connect: Remove TODO about use_ipv4/6 done in 3bfb20be844c
6 years ago
Matthew Wild
c5fcad823a
Backed out changeset 44ef46e1a951 (not optimal API)
6 years ago
Matthew Wild
d3a6636c1c
net.connect: Add API to create custom connect()s with options, incl. use_ipv[46]
6 years ago
Kim Alvefur
9d5c3cb856
net.connect: Mention RFC 6724 regression
...
Default Address Selection algorithm is not applied, resulting in a
strong bias towards IPv4.
6 years ago
Kim Alvefur
40ffc88bad
net.connect: Add some TODOs and FIXMEs
...
And mention issue numbers: #1246 , #1428 and #1429
6 years ago
Kim Alvefur
e8f099babc
net.connect: Add some TODO comments
6 years ago
Kim Alvefur
75bfec7731
net.*: Remove tostring call from logging
...
Taken care of by loggingmanager now
7 years ago
Kim Alvefur
7a86af343f
net.connect: Fix passing request table to new listener
...
This could be a return value from ondetach
7 years ago
Kim Alvefur
7f9c753df9
net.connect: Remove manual onattach callback invocation
7 years ago
Matthew Wild
5eb41ade9b
net.connect: Fix to store correct parameter
8 years ago
Matthew Wild
3b771f4dcd
net.connect: Improve error message
8 years ago
Matthew Wild
8b8926d7bb
net.connect: Handle immediate failures of server.addclient
8 years ago
Matthew Wild
8ab5e4497e
net.connect: Handle case when resolver runs out of targets
8 years ago
Matthew Wild
85261e71be
net.connect: Track last connection error
8 years ago
Matthew Wild
df664e829b
net.connect: Default to *a pattern if none provided
8 years ago
Matthew Wild
c27281a720
net.connect: New API for outgoing connections, based on 'service resolvers'
8 years ago
Matthew Wild
28e919462b
net.connect: Improve logging on connection attempt failure
4 years ago
Matthew Wild
b42fe8746c
net.connect: Improve handling of failure when attempts are still pending
...
This could lead to failure being reported too early, even if some connections
have not yet failed.
4 years ago
Matthew Wild
a188ece31a
net.connect: When more targets are immediately available, try them after a delay
...
RFC 8305
4 years ago
Matthew Wild
f278c021e6
net.connect: Support for multiple pending connection attempts
4 years ago