# HG changeset patch # User Matthew Wild # Date 1262831794 0 # Node ID 1e927484c6eccbac166d055db86cc1cb5a4d42a6 # Parent 751db005032e9d42a865fad9cde3da460f2ec65d clix: Close connection after fatal error during login diff -r 751db005032e -r 1e927484c6ec clix.lua --- a/clix.lua Thu Jan 07 02:35:04 2010 +0000 +++ b/clix.lua Thu Jan 07 02:36:34 2010 +0000 @@ -65,10 +65,12 @@ conn.log.debug = opts.verbose; conn:hook("authentication-failure", function (err) conn:error("Authentication failure ("..(err.condition or "unknown error")..")"..(err.text and (": "..err.text) or "")); + conn:close(); end); conn:hook("binding-success", function () conn:debug("Connected: "..tostring(conn)); return on_connect(conn); end); conn:hook("binding-failure", function (err) conn:error("Resource binding failure ("..(err.condition or "unknown error")..")"..(err.text and (": "..err.text) or "")); + conn:close(); end); conn:hook("disconnected", function (info) if info.reason then