verse.client: Fire disconnected event when the disconnect is initiated by the client too

Wed, 06 Jan 2010 17:43:25 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Wed, 06 Jan 2010 17:43:25 +0000
changeset 46
6a329776fb42
parent 45
50a2e4fb0a16
child 47
3ebffb4fc48c

verse.client: Fire disconnected event when the disconnect is initiated by the client too

client.lua file | annotate | diff | comparison | revisions
--- a/client.lua	Wed Jan 06 17:42:57 2010 +0000
+++ b/client.lua	Wed Jan 06 17:43:25 2010 +0000
@@ -107,7 +107,9 @@
 	if not self.notopen then
 		self:send("</stream:stream>");
 	end
+	local on_disconnect = self.conn.disconnect();
 	self.conn:close();
+	on_disconnect(conn, reason);
 end
 
 function stream:send_iq(iq, callback)

mercurial