socket.setblocking(0)
socket.send(b'a' * 32 * 1024 * 1024)
In the example above socket.send() fails with this error:
Error in connection handler
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/websockets/server.py", line 81, in handler
yield from self.ws_handler(self, path)
File "/var/www/vhosts/.../app/sockets/core/Daemon.py", line 286, in websocketClientHandler
self.api.connection.send(data)
File "/usr/lib/python3.5/ssl.py", line 869, in send
return self._sslobj.write(data)
File "/usr/lib/python3.5/ssl.py", line 594, in write
return self._sslobj.write(data)
ssl.SSLWantWriteError: The operation did not complete (write) (_ssl.c:1949) |