Diff

client.lua @ 46:6a329776fb42

verse.client: Fire disconnected event when the disconnect is initiated by the client too
author Matthew Wild <mwild1@gmail.com>
date Wed, 06 Jan 2010 17:43:25 +0000
parent 38:c40cc28ac7df
child 47:3ebffb4fc48c
line wrap: on
line diff
--- 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)