19 lines
573 B
Diff
19 lines
573 B
Diff
select() times out if there's no IO ready in the socket which sometimes
|
|
might happen due to OpenSSL buffering.
|
|
|
|
Use SSL_pending(3) to make sure SSL_read(3) sucks in last buffered bytes.
|
|
|
|
--- a/common.c 2013-01-13 17:12:06.434631196 +0100
|
|
+++ b/common.c 2013-01-13 17:12:36.185921621 +0100
|
|
@@ -529,6 +529,10 @@ fetch_read(conn_t *conn, char *buf, size
|
|
fetch_syserr();
|
|
return (-1);
|
|
}
|
|
+#ifdef WITH_SSL
|
|
+ if (conn->ssl && SSL_pending(conn->ssl))
|
|
+ break;
|
|
+#endif
|
|
errno = 0;
|
|
r = select(conn->sd + 1, &readfds, NULL, NULL, &waittv);
|
|
if (r == -1) {
|