gnutls->handshake: improved timeout handling
authorDaniel Stenberg <daniel@haxx.se>
Sun, 14 Nov 2010 11:42:29 +0000 (12:42 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 14 Nov 2010 11:42:29 +0000 (12:42 +0100)
commitcbf4961bf3e42d88f6489f981efd509faa86f501
tree10755978df1363c0862d39c249a3cdb06fc21fe5
parentadd5766dd4d8a15f3f96254fc65e9ab5c9ff3d48
gnutls->handshake: improved timeout handling

When no timeout is set, we call the socket_ready function with a timeout
value of 0 during handshake, which makes it loop too much/fast in this
function. It also made this function return CURLE_OPERATION_TIMEDOUT
wrongly on a slow handshake.

However, the particular bug report that highlighted this problem is not
solved by this fix, as this fix only makes the more proper error get
reported instead.

Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=594150
Reported by: Johannes Ernst
lib/gtls.c