Commit ec903d20 authored by Heikki Linnakangas's avatar Heikki Linnakangas

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.
parent 73cfa37a
...@@ -744,9 +744,10 @@ retry3: ...@@ -744,9 +744,10 @@ retry3:
* the file selected for reading already. * the file selected for reading already.
* *
* In SSL mode it's even worse: SSL_read() could say WANT_READ and then * 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 * data could arrive before we make the pqReadReady() test, but the
* play dumb and assume there is more data, relying on the SSL layer to * second SSL_read() could still say WANT_READ because the data received
* detect true EOF. * 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 #ifdef USE_SSL
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment