summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream/filesocket.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-05-31 10:59:14 -0700
committerLance Stout <lancestout@gmail.com>2011-05-31 10:59:14 -0700
commit5ed27bf5f65f03e14da24a60e261a175074cb7aa (patch)
treec79db47352f003b51459016df699032b51712292 /sleekxmpp/xmlstream/filesocket.py
parent62bdaab7c7fc5a35c83ac9f3b0bf5b393f0eb925 (diff)
parenta81162edd2434756e21d7f9a79d71d770a43db7b (diff)
downloadslixmpp-5ed27bf5f65f03e14da24a60e261a175074cb7aa.tar.gz
slixmpp-5ed27bf5f65f03e14da24a60e261a175074cb7aa.tar.bz2
slixmpp-5ed27bf5f65f03e14da24a60e261a175074cb7aa.tar.xz
slixmpp-5ed27bf5f65f03e14da24a60e261a175074cb7aa.zip
Merge branch 'develop' into roster
Diffstat (limited to 'sleekxmpp/xmlstream/filesocket.py')
-rw-r--r--sleekxmpp/xmlstream/filesocket.py2
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