Changeset

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
parents 324:dbb3362c1ff3
children 326:f657ed8f464e
files init.lua
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
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