]> git.ipfire.org Git - thirdparty/dovecot/core.git/commit
lib-http: client: Fixed bug in handling of lost connections while returning from...
authorStephan Bosch <stephan@dovecot.fi>
Wed, 25 May 2016 21:41:47 +0000 (23:41 +0200)
committerStephan Bosch <stephan@dovecot.fi>
Thu, 26 May 2016 01:05:45 +0000 (03:05 +0200)
commit57c339f4e3404355a8924103317a6158a709ecf1
tree2e674fce6445e1a67771be1b6b5ffde37170482c
parent8a6dc50255a27bf887bbd9ed7c3a87bf629d4179
lib-http: client: Fixed bug in handling of lost connections while returning from another ioloop.

At one instance the http_client_connection_is_ready() function could have destroyed the connection while the caller still depended on it.
Renamed the http_client_connection_is_ready() function to http_client_connection_check_ready().
This now returns -1 when the connection got destroyed. Before it returned a bool that just indicated whether the connection was ready or not.
So, there is no need anymore to preserve a connection reference while calling this function.
src/lib-http/http-client-connection.c
src/lib-http/http-client-peer.c
src/lib-http/http-client-private.h