aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-11-01 13:54:32 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-11-01 13:54:32 +0000
commit9b6545c479394e5ca7c52c1c1d59086533783521 (patch)
tree9653f443cbbe7f4459b1399baf629b90ee1269fb /lib/url.c
parent96fb1182514f6a19fbed95abac8defe0e2a62ada (diff)
ConnectionExists() now returns FALSE immediately if it finds a connection
that is dead, because it can only find one entry anyway and if that is dead there won't be any other entry that matches
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/url.c b/lib/url.c
index 0d0cf6ab5..6b2a3a8c2 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -996,10 +996,20 @@ ConnectionExists(struct SessionHandle *data,
}
dead = SocketIsDead(check->firstsocket);
if(dead) {
+ /*
+ * Even though the connection seems to have passed away, we could
+ * still make an effort to get the name information, as we intend to
+ * connect to the same host again.
+ *
+ * This is now subject to discussion. What do you think?
+ */
infof(data, "Connection %d seems to be dead!\n", i);
Curl_disconnect(check); /* disconnect resources */
data->state.connects[i]=NULL; /* nothing here */
- continue; /* try another one now */
+
+ /* There's no need to continue search, because we only store
+ one connection for each unique set of identifiers */
+ return FALSE;
}
*usethis = check;