aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2014-08-07 12:38:16 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2014-08-07 12:40:13 +0300
commitec903d20e3b4c1a543dbf057055e4ddbfad4d59e (patch)
tree0c33c66c4243aee7381aba20605eb5d8c2855519
parent73cfa37afe3243c0ccdc6ae72cfcc53a37761521 (diff)
downloadpostgresql-ec903d20e3b4c1a543dbf057055e4ddbfad4d59e.tar.gz
postgresql-ec903d20e3b4c1a543dbf057055e4ddbfad4d59e.zip
Improve comment.
Based on the old comment, it took me a while to figure out what the problem was. The importnat detail is that SSL_read() can return WANT_READ even though some raw data was received from the socket.
-rw-r--r--src/interfaces/libpq/fe-misc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/interfaces/libpq/fe-misc.c b/src/interfaces/libpq/fe-misc.c
index 7a213bf8390..a75db19ae43 100644
--- a/src/interfaces/libpq/fe-misc.c
+++ b/src/interfaces/libpq/fe-misc.c
@@ -744,9 +744,10 @@ retry3:
* the file selected for reading already.
*
* In SSL mode it's even worse: SSL_read() could say WANT_READ and then
- * data could arrive before we make the pqReadReady() test. So we must
- * play dumb and assume there is more data, relying on the SSL layer to
- * detect true EOF.
+ * data could arrive before we make the pqReadReady() test, but the
+ * second SSL_read() could still say WANT_READ because the data received
+ * was not a complete SSL record. So we must play dumb and assume there
+ * is more data, relying on the SSL layer to detect true EOF.
*/
#ifdef USE_SSL