Diff

init.lua @ 325:843fabce2fc7

verse: Only fire the disconnected event if the stream and the connection are still associated (fixes smacks issue)
author Kim Alvefur <zash@zash.se>
date Sun, 10 Feb 2013 03:29:04 +0100
parent 322:819b35b8fcf6
child 327:963d156a4b36
line wrap: on
line diff
--- a/init.lua	Sun Feb 10 02:54:01 2013 +0100
+++ b/init.lua	Sun Feb 10 03:29:04 2013 +0100
@@ -229,6 +229,7 @@
 	end
 	
 	function conn_listener.ondisconnect(conn, err)
+		if conn.conn ~= stream.conn then return end
 		stream.connected = false;
 		stream:event("disconnected", { reason = err });
 	end