diff --git a/src/common/xmpp/dispatcher_nb.py b/src/common/xmpp/dispatcher_nb.py
index f174fe5b06692dee83d5e1cf30d4ff1fc8375ce1..a003177f44cf6924b39d755c0ccd9ab13987ba0a 100644
--- a/src/common/xmpp/dispatcher_nb.py
+++ b/src/common/xmpp/dispatcher_nb.py
@@ -357,6 +357,10 @@ class Dispatcher(PlugIn):
 		if data is None:
 			return
 		res = self.ProcessNonBlocking(data)
+		# 0 result indicates that we have closed the connection, e.g.
+		# we have released dispatcher, so self._owner has no methods
+		if not res:
+			return
 		self._owner.remove_timeout()
 		if self._expected[self._witid] is None:
 			return