Commit 381b9b0a authored by Philipp Hörist's avatar Philipp Hörist

Merge branch 'SSL_ERROR' into 'master'

Zeroconf: SSL_ERROR_* has been moved to ssl module

Closes #8625

See merge request !100
parents a0a27d9c e9038f22
......@@ -27,6 +27,7 @@
from nbxmpp.protocol import *
import socket
import ssl
import errno
import sys
import os
......@@ -515,14 +516,14 @@ def pollin(self):
except Exception as e:
errnum = e.errno
# "received" will be empty anyhow
if errnum == socket.SSL_ERROR_WANT_READ:
if errnum == ssl.SSL_ERROR_WANT_READ:
elif errnum in [errno.ECONNRESET, errno.ENOTCONN, errno.ESHUTDOWN]:
# don't proccess result, cas it will raise error
elif not received :
if errnum != socket.SSL_ERROR_EOF:
if errnum != ssl.SSL_ERROR_EOF:
# 8 EOF occurred in violation of protocol
if self.state >= 0:
......@@ -583,7 +584,7 @@ def _do_send(self):
except socket.error as e:
if e.errno == socket.SSL_ERROR_WANT_WRITE:
if e.errno == ssl.SSL_ERROR_WANT_WRITE:
return True
if self.state < 0:
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