aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-10-31 15:14:52 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-10-31 15:14:52 +0000
commitc4f1a9f690449482ee4333e1ec58169d5e5a3d25 (patch)
tree0b9f2566a926cbf45438eb7b73c095adf5ff1c3c /lib/url.c
parent542055074b588ff700ddb31bedf6b4caa76a7e5d (diff)
Removed the SocketIsDead() stuff for SSL again as it doesn't work. We must
rely on the new go-ahead-and-try mechanism that I just added to Transfer()
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c37
1 files changed, 5 insertions, 32 deletions
diff --git a/lib/url.c b/lib/url.c
index b11d33aac..0d0cf6ab5 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -877,7 +877,7 @@ CURLcode Curl_disconnect(struct connectdata *conn)
if(-1 != conn->connectindex) {
/* unlink ourselves! */
- infof(conn->data, "Closing live connection (#%d)\n", conn->connectindex);
+ infof(conn->data, "Closing connection #%d\n", conn->connectindex);
conn->data->state.connects[conn->connectindex] = NULL;
}
@@ -935,7 +935,7 @@ CURLcode Curl_disconnect(struct connectdata *conn)
* be dead. Most commonly this happens when the server has closed the
* connection due to inactivity.
*/
-static bool SocketIsDead(struct connectdata *conn, int sock)
+static bool SocketIsDead(int sock)
{
int sval;
bool ret_val = TRUE;
@@ -949,36 +949,9 @@ static bool SocketIsDead(struct connectdata *conn, int sock)
to.tv_usec = 1;
sval = select(sock + 1, &check_set, 0, 0, &to);
- if(sval == 0) {
+ if(sval == 0)
/* timeout */
ret_val = FALSE;
-#ifdef USE_SSLEAY
- /* the socket seems fine, but is the SSL later fine too? */
- if(conn->ssl.use) {
- int peek;
- int error;
- Curl_nonblock(sock, TRUE);
-
- peek = SSL_peek(conn->ssl.handle,
- conn->data->state.buffer, BUFSIZE);
-
- infof(conn->data, "SSL_peek returned %d\n", peek);
-
- if(-1 == peek) {
- error = SSL_get_error(conn->ssl.handle, peek);
- infof(conn->data, "SSL_error returned %d\n", error);
-
- if(SSL_ERROR_WANT_READ != error)
- ret_val = TRUE;
- }
- else
- /* peek did not return -1 */
- ret_val = TRUE;
-
- Curl_nonblock(sock, FALSE);
- }
-#endif
- }
return ret_val;
}
@@ -1021,7 +994,7 @@ ConnectionExists(struct SessionHandle *data,
continue;
}
}
- dead = SocketIsDead(check, check->firstsocket);
+ dead = SocketIsDead(check->firstsocket);
if(dead) {
infof(data, "Connection %d seems to be dead!\n", i);
Curl_disconnect(check); /* disconnect resources */
@@ -2167,7 +2140,7 @@ CURLcode Curl_done(struct connectdata *conn)
((CURLE_OK == result) && conn->bits.close))
result = Curl_disconnect(conn); /* close the connection */
else
- infof(data, "Connection (#%d) left alive\n", conn->connectindex);
+ infof(data, "Connection #%d left intact\n", conn->connectindex);
return result;
}