clix.lua: Don't break if the disconnected event has no event data, and don't warn if the stream was closed cleanly

Mon, 11 Feb 2013 00:00:49 +0100

author
Kim Alvefur <zash@zash.se>
date
Mon, 11 Feb 2013 00:00:49 +0100
changeset 107
a074eaacefe7
parent 106
730fcde562ce
child 108
c33848e79bfc

clix.lua: Don't break if the disconnected event has no event data, and don't warn if the stream was closed cleanly

clix.lua file | annotate | diff | comparison | revisions
--- a/clix.lua	Sun Feb 10 23:59:34 2013 +0100
+++ b/clix.lua	Mon Feb 11 00:00:49 2013 +0100
@@ -86,7 +86,7 @@
 		conn:close();
 	end);
 	conn:hook("disconnected", function (info)
-		if info.reason then
+		if info and info.reason and info.reason ~= "stream closed"  then
 			conn:warn("Disconnecting: %s", tostring(info.reason));
 		end
 		verse.quit();

mercurial