Re: libpq SSL with non-blocking sockets - Mailing list pgsql-hackers

From Steve Singer
Subject Re: libpq SSL with non-blocking sockets
Date
Msg-id BLU0-SMTP93E0029461ABF3EFF6DDF98E580@phx.gbl
Whole thread Raw
In response to Re: libpq SSL with non-blocking sockets  (Martin Pihlak <martin.pihlak@gmail.com>)
List pgsql-hackers
On 11-06-28 02:14 PM, Martin Pihlak wrote:
>
> Hmm, I thought I thought about that. There was a check in the original
> patch: "if (conn->sslRetryBytes || (conn->outCount - remaining)>  0)"
> So if the SSL retry buffer was emptied it would return 1 if there was
> something left in the regular output buffer. Or did I miss something
> there?
>

The issue I saw in the original patch was that at that point in the 
function, sslRetryBytes could be zero (if the data was sent) but  
conn->outCount - remaining would be an incorrect value since "remaining" 
is the number of bytes left to send from sslRetryBuf NOT 
conn->outBuffer.   This is no longer an issue in the updated patch.
I will try to take a closer look at your updated patch in the next few days.



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: how to call the function--pqCatenateResultError()
Next
From: Alvaro Herrera
Date:
Subject: Re: Bug in SQL/MED?