fritzy/SleekXMPP — Issue #109: Connection error: SSL3_WRITE_PENDING
Author: legastero
Created: 2011-10-30 22:53:59+00:00
State: open

So, when connecting to a Prosody server running on the same machine, the connection fails with a SSL3_WRITE_PENDING socket error. Not using the debug level logging reduces the frequency of the errors. This can happen 7-10 times in a row before a successful connection.

The documentation for the SSL3_WRITE_PENDING error says that it is an issue with non-blocking sockets, even though as far as I am aware of, we don't use non-blocking sockets.

Another project with the same issue (https://github.com/pika/pika/issues/59) says that Python's SSL sockets send the entirety of the send buffer at once or nothing at all. If 0-bytes were sent, then the exact same call must be made or else the SSL3_WRITE_PENDING error occurs.

http://bugs.python.org/issue8240