summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream/xmlstream.py
diff options
context:
space:
mode:
authorAnton Ryzhov <anton@ryzhov.me>2013-06-20 15:30:51 +0400
committerAnton Ryzhov <anton@ryzhov.me>2013-06-20 18:29:53 +0400
commit1776e2edccf5f26d1d869791e19442ea35876bb1 (patch)
tree1e3d06b33822a46f1db44a9107ab3e8df08da8c2 /sleekxmpp/xmlstream/xmlstream.py
parentbaf9aaf26c80c87e770cdf35b1fa4fe231663246 (diff)
downloadslixmpp-1776e2edccf5f26d1d869791e19442ea35876bb1.tar.gz
slixmpp-1776e2edccf5f26d1d869791e19442ea35876bb1.tar.bz2
slixmpp-1776e2edccf5f26d1d869791e19442ea35876bb1.tar.xz
slixmpp-1776e2edccf5f26d1d869791e19442ea35876bb1.zip
Skip EINTR errors on raw sockets
Diffstat (limited to 'sleekxmpp/xmlstream/xmlstream.py')
-rw-r--r--sleekxmpp/xmlstream/xmlstream.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py
index 478bd9c0..6de19482 100644
--- a/sleekxmpp/xmlstream/xmlstream.py
+++ b/sleekxmpp/xmlstream/xmlstream.py
@@ -1294,6 +1294,9 @@ class XMLStream(object):
try:
sent += self.socket.send(data[sent:])
count += 1
+ except Socket.error as serr:
+ if serr.errno != errno.EINTR:
+ raise
except ssl.SSLError as serr:
if tries >= self.ssl_retry_max:
log.debug('SSL error: max retries reached')
@@ -1715,6 +1718,9 @@ class XMLStream(object):
try:
sent += self.socket.send(enc_data[sent:])
count += 1
+ except Socket.error as serr:
+ if serr.errno != errno.EINTR:
+ raise
except ssl.SSLError as serr:
if tries >= self.ssl_retry_max:
log.debug('SSL error: max retries reached')