diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-05-02 17:01:21 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-05-02 17:01:21 +0100 |
commit | 2ced82baeee220c7aac9e0816c7f05b13575474f (patch) | |
tree | 269376858545dcb3b83183fef2e7cd3802d9dd86 | |
parent | ce1be686ab71efb0e68beeb3b292596df38eb602 (diff) | |
download | prosody-2ced82baeee220c7aac9e0816c7f05b13575474f.tar.gz prosody-2ced82baeee220c7aac9e0816c7f05b13575474f.zip |
prosody: Add log messages during shutdown sequence to indicate progress
-rwxr-xr-x | prosody | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -195,6 +195,7 @@ while select(2, xpcall(server.loop, catch_uncaught_error)) ~= "quitting" do socket.sleep(0.2); end +log("info", "Shutdown status: Cleaning up"); eventmanager.fire_event("server-cleanup"); -- Ok, we're quitting I know, but we @@ -202,6 +203,7 @@ eventmanager.fire_event("server-cleanup"); server.setquitting(false); for hostname, host in pairs(hosts) do + log("info", "Shutdown status: Closing client connections for %s", hostname) if host.sessions then for username, user in pairs(host.sessions) do for resource, session in pairs(user.sessions) do @@ -211,6 +213,7 @@ for hostname, host in pairs(hosts) do end end + log("info", "Shutdown status: Closing outgoing s2s connections from %s", hostname); if host.s2sout then for remotehost, session in pairs(host.s2sout) do if session.close then @@ -222,6 +225,10 @@ for hostname, host in pairs(hosts) do end end +log("info", "Shutdown status: Closing all server connections"); server.closeall(); +server.setquitting(true); + eventmanager.fire_event("server-stopped"); +log("info", "Shutdown status: Complete!"); |