mirror of
git://git.psyced.org/git/psyced
synced 2024-08-15 03:25:10 +00:00
shutdown notify fixes
This commit is contained in:
parent
ba034cad16
commit
753bfac6dc
3 changed files with 7 additions and 6 deletions
|
@ -270,7 +270,7 @@ void notify_shutdown(string crash_reason) {
|
||||||
object o;
|
object o;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
P3(("notify_shutdown(%O) from %O\n", crash_reason, previous_object()))
|
P0(("notify_shutdown(%O) from %O\n", crash_reason, previous_object()))
|
||||||
if (previous_object() && previous_object() != this_object())
|
if (previous_object() && previous_object() != this_object())
|
||||||
return;
|
return;
|
||||||
#if DEBUG > 0
|
#if DEBUG > 0
|
||||||
|
@ -282,7 +282,8 @@ void notify_shutdown(string crash_reason) {
|
||||||
#endif
|
#endif
|
||||||
// walk thru the shutdown path a third time in case this is a
|
// walk thru the shutdown path a third time in case this is a
|
||||||
// shutdown by kill -1 process.
|
// shutdown by kill -1 process.
|
||||||
SIMUL_EFUN_FILE -> server_shutdown(4404, 2);
|
SIMUL_EFUN_FILE -> server_shutdown("notify_shutdown: "+ crash_reason,
|
||||||
|
4404, 2);
|
||||||
// save_wiz_file();
|
// save_wiz_file();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -290,7 +291,7 @@ void notify_shutdown(string crash_reason) {
|
||||||
void slow_shut_down(int minutes) {
|
void slow_shut_down(int minutes) {
|
||||||
SIMUL_EFUN_FILE -> shout(0, "_notice_broadcast_shutdown_panic",
|
SIMUL_EFUN_FILE -> shout(0, "_notice_broadcast_shutdown_panic",
|
||||||
"Server is slowly running out of memory. Restart imminent.");
|
"Server is slowly running out of memory. Restart imminent.");
|
||||||
SIMUL_EFUN_FILE -> server_shutdown(1, 0);
|
SIMUL_EFUN_FILE -> server_shutdown("slow_shut_down: "+ minutes, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// called by driver at shutdown for every user
|
// called by driver at shutdown for every user
|
||||||
|
|
|
@ -266,7 +266,7 @@ htget(prot, query, headers, qs) {
|
||||||
s += "<b>Your chatserver is being restarted.</b>";
|
s += "<b>Your chatserver is being restarted.</b>";
|
||||||
// write at the bottom wouldn't be called after shutdown, would it?
|
// write at the bottom wouldn't be called after shutdown, would it?
|
||||||
write(s);
|
write(s);
|
||||||
shutdown();
|
server_shutdown("restart by web configuration", 1);
|
||||||
return 1;
|
return 1;
|
||||||
case "list_udp":
|
case "list_udp":
|
||||||
{
|
{
|
||||||
|
|
|
@ -626,7 +626,7 @@ sName2(a) {
|
||||||
"Object could not be restored!");
|
"Object could not be restored!");
|
||||||
|
|
||||||
#ifdef PANIC_ON_NO_ADMIN
|
#ifdef PANIC_ON_NO_ADMIN
|
||||||
shutdown();
|
server_shutdown("could not restore admin");
|
||||||
#endif
|
#endif
|
||||||
destruct(ME);
|
destruct(ME);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -687,7 +687,7 @@ sName2(a) {
|
||||||
"You are registered as admin, but I could not restore your data!");
|
"You are registered as admin, but I could not restore your data!");
|
||||||
// raise_error("boss without password\n");
|
// raise_error("boss without password\n");
|
||||||
#ifdef PANIC_ON_NO_ADMIN
|
#ifdef PANIC_ON_NO_ADMIN
|
||||||
shutdown();
|
server_shutdown("could not restore admin");
|
||||||
#endif
|
#endif
|
||||||
destruct(ME);
|
destruct(ME);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue