diff options
Diffstat (limited to 'sleekxmpp/xmlstream/filesocket.py')
-rw-r--r-- | sleekxmpp/xmlstream/filesocket.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sleekxmpp/xmlstream/filesocket.py b/sleekxmpp/xmlstream/filesocket.py index 441ff875..fd81864b 100644 --- a/sleekxmpp/xmlstream/filesocket.py +++ b/sleekxmpp/xmlstream/filesocket.py @@ -22,6 +22,8 @@ class FileSocket(_fileobject): def read(self, size=4096): """Read data from the socket as if it were a file.""" + if self._sock is None: + return None data = self._sock.recv(size) if data is not None: return data |