84 conn:hook("bind-failure", function (err) |
84 conn:hook("bind-failure", function (err) |
85 conn:error("Resource binding failure ("..(err.condition or "unknown error")..")"..(err.text and (": "..err.text) or "")); |
85 conn:error("Resource binding failure ("..(err.condition or "unknown error")..")"..(err.text and (": "..err.text) or "")); |
86 conn:close(); |
86 conn:close(); |
87 end); |
87 end); |
88 conn:hook("disconnected", function (info) |
88 conn:hook("disconnected", function (info) |
89 if info.reason then |
89 if info and info.reason and info.reason ~= "stream closed" then |
90 conn:warn("Disconnecting: %s", tostring(info.reason)); |
90 conn:warn("Disconnecting: %s", tostring(info.reason)); |
91 end |
91 end |
92 verse.quit(); |
92 verse.quit(); |
93 end); |
93 end); |
94 -- Optional config parameters |
94 -- Optional config parameters |