From c59a6d0f51112b1bc35f9d492342dea63bfce6e5 Mon Sep 17 00:00:00 2001 From: Sandro Munda Date: Thu, 7 Jun 2012 18:37:42 +0200 Subject: Sent a socks_closed when the socket is closed in the xep_0065 plugin. --- sleekxmpp/plugins/xep_0065/proxy.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sleekxmpp/plugins/xep_0065/proxy.py') diff --git a/sleekxmpp/plugins/xep_0065/proxy.py b/sleekxmpp/plugins/xep_0065/proxy.py index 86598df3..89f37399 100644 --- a/sleekxmpp/plugins/xep_0065/proxy.py +++ b/sleekxmpp/plugins/xep_0065/proxy.py @@ -217,7 +217,10 @@ class xep_0065(base_plugin): proxy = self.proxy_threads.get(sid) if proxy: - self.xmpp.event('socks_recv', data) + if not data: + self.xmpp.event('socks_closed', sid) + else: + self.xmpp.event('socks_recv', data) class Proxy(Thread): -- cgit v1.2.3