Re: BUG: possible busy loop when connection is closed while trying to establish SSL connection - Mailing list pgsql-hackers

From Tom Lane
Subject Re: BUG: possible busy loop when connection is closed while trying to establish SSL connection
Date
Msg-id 25651.1095948495@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG: possible busy loop when connection is closed  (Hannu Krosing <hannu@tm.ee>)
Responses Re: BUG: possible busy loop when connection is closed
List pgsql-hackers
Hannu Krosing <hannu@tm.ee> writes:
>> One possibility is to forget the direct call to recv() and use
>> pqReadData --- since conn->ssl isn't set yet, and we aren't expecting
>> the server to send more than one byte, this should in theory be safe.

> I was scared by the comment before recv(...,1,0) which said we must be
> careful not to read more than 1 byte

When I wrote that, I was trying to assume as little as possible about
the SSL protocol.  The only way there could be a problem is if the
server is first to send during the SSL negotiation handshake; which
seems odd but not impossible.  Anyone know for sure?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: NOFIXADE / NOPRINTADE
Next
From: Tom Lane
Date:
Subject: Re: NOFIXADE / NOPRINTADE