diff options
author | Isaac Boukris <iboukris@gmail.com> | 2016-12-07 00:39:08 +0200 |
---|---|---|
committer | Michael Kaufmann <mail@michael-kaufmann.ch> | 2016-12-18 12:47:10 +0100 |
commit | 82245eaa56c368f6b6b9abf4de63e7d6fb786f71 (patch) | |
tree | c843d8d8e23fc1bae1b6964d67320219ca39f679 /lib/connect.h | |
parent | 6bc1051608a03da2e7a457839e7d21a1b3cfb911 (diff) | |
download | curl-82245eaa56c368f6b6b9abf4de63e7d6fb786f71.tar.gz |
Curl_getconnectinfo: avoid checking if the connection is closed
It doesn't benefit us much as the connection could get closed at
any time, and also by checking we lose the ability to determine
if the socket was closed by reading zero bytes.
Reported-by: Michael Kaufmann
Closes https://github.com/curl/curl/pull/1134
Diffstat (limited to 'lib/connect.h')
-rw-r--r-- | lib/connect.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/connect.h b/lib/connect.h index 5e48eb644..e01d1b35e 100644 --- a/lib/connect.h +++ b/lib/connect.h @@ -52,6 +52,11 @@ time_t Curl_timeleft(struct Curl_easy *data, curl_socket_t Curl_getconnectinfo(struct Curl_easy *data, struct connectdata **connp); +/* + * Check if a connection seems to be alive. + */ +bool Curl_connalive(struct connectdata *conn); + #ifdef USE_WINSOCK /* When you run a program that uses the Windows Sockets API, you may experience slow performance when you copy data to a TCP server. |