1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-29 10:41:53 +03:00

Put SSL_pending() call behind the new internal SSL API.

It seems likely that any SSL implementation will need a similar call, not
just OpenSSL.
This commit is contained in:
Heikki Linnakangas
2014-12-01 17:43:14 +02:00
parent 6d6cade05b
commit 4e86f1b16d
3 changed files with 12 additions and 2 deletions

View File

@ -1054,9 +1054,9 @@ pqSocketCheck(PGconn *conn, int forRead, int forWrite, time_t end_time)
return -1;
}
#ifdef USE_OPENSSL
#ifdef USE_SSL
/* Check for SSL library buffering read bytes */
if (forRead && conn->ssl && SSL_pending(conn->ssl) > 0)
if (forRead && conn->ssl_in_use && pgtls_read_pending(conn) > 0)
{
/* short-circuit the select */
return 1;