[dovecot/core] 4ef999: lib-http: client: Fixed race condition between DNS...
GitHub
noreply at github.com
Wed May 3 14:30:10 EEST 2017
Branch: refs/heads/master
Home: https://github.com/dovecot/core
Commit: 4ef99978b3d18444dcea81eeabccdc8e19cd3434
https://github.com/dovecot/core/commit/4ef99978b3d18444dcea81eeabccdc8e19cd3434
Author: Stephan Bosch <stephan.bosch at dovecot.fi>
Date: 2017-05-03 (Wed, 03 May 2017)
Changed paths:
M src/lib-http/http-client-host.c
Log Message:
-----------
lib-http: client: Fixed race condition between DNS refresh lookup and a soft connection timeout.
The refreshing DNS lookup cleared all the IPs, but the soft connection timeout (and maybe other code) still relied on them.
Adding tests everywhere for host->ips_count == 0 is annoying, so I changed the DNS lookup code such that the stale IPs remain present while the DNS lookup is being performed.
The pending lookup prevents new connections through http_client_host_refresh(), so this will not create potentially useless connections.
More information about the dovecot-cvs
mailing list