summaryrefslogtreecommitdiff
path: root/papyon/gnet/io/ssl_socket.py
diff options
context:
space:
mode:
Diffstat (limited to 'papyon/gnet/io/ssl_socket.py')
-rw-r--r--papyon/gnet/io/ssl_socket.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/papyon/gnet/io/ssl_socket.py b/papyon/gnet/io/ssl_socket.py
index cb7f25e..0d49c99 100644
--- a/papyon/gnet/io/ssl_socket.py
+++ b/papyon/gnet/io/ssl_socket.py
@@ -24,6 +24,7 @@ from iochannel import GIOChannelClient
import gobject
import socket
+import sys
import OpenSSL.SSL as OpenSSL
__all__ = ['SSLSocketClient']
@@ -83,6 +84,9 @@ class SSLSocketClient(GIOChannelClient):
buf = self._transport.recv(2048)
if buf != "":
self.emit("received", buf, len(buf))
+ elif sys.platform != "win32":
+ self.close()
+ return False
except (OpenSSL.WantX509LookupError,
OpenSSL.WantReadError, OpenSSL.WantWriteError):
pass