]> granicus.if.org Git - postgresql/commitdiff
Improve comment.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 7 Aug 2014 09:38:16 +0000 (12:38 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 7 Aug 2014 09:40:13 +0000 (12:40 +0300)
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.

src/interfaces/libpq/fe-misc.c

index 7a213bf8390e6f117bbe0312e9a6b7ec41ce50b7..a75db19ae4366144f34bbf730c08dd8135e93a9f 100644 (file)
@@ -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