Skip to content

Commit 01a2abe

Browse files
bagderkdudka
authored andcommitted
nss: give PR_INTERVAL_NO_WAIT instead of -1 to PR_Recv/PR_Send
Reported by: David Strauss Bug: http://curl.haxx.se/mail/lib-2013-05/0088.html
1 parent a45e3f9 commit 01a2abe

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

lib/nss.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1482,10 +1482,8 @@ static ssize_t nss_send(struct connectdata *conn, /* connection data */
14821482
size_t len, /* amount to write */
14831483
CURLcode *curlcode)
14841484
{
1485-
int rc;
1486-
1487-
rc = PR_Send(conn->ssl[sockindex].handle, mem, (int)len, 0, -1);
1488-
1485+
ssize_t rc = PR_Send(conn->ssl[sockindex].handle, mem, (int)len, 0,
1486+
PR_INTERVAL_NO_WAIT);
14891487
if(rc < 0) {
14901488
PRInt32 err = PR_GetError();
14911489
if(err == PR_WOULD_BLOCK_ERROR)
@@ -1513,9 +1511,8 @@ static ssize_t nss_recv(struct connectdata * conn, /* connection data */
15131511
size_t buffersize, /* max amount to read */
15141512
CURLcode *curlcode)
15151513
{
1516-
ssize_t nread;
1517-
1518-
nread = PR_Recv(conn->ssl[num].handle, buf, (int)buffersize, 0, -1);
1514+
ssize_t nread = PR_Recv(conn->ssl[num].handle, buf, (int)buffersize, 0,
1515+
PR_INTERVAL_NO_WAIT);
15191516
if(nread < 0) {
15201517
/* failed SSL read */
15211518
PRInt32 err = PR_GetError();

0 commit comments

Comments
 (0)