Skip to content

Commit e6083dc

Browse files
committed
verbose logging for pre_shutdown to see where it may be randomly failing.
1 parent 04ed3fa commit e6083dc

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

code/world.dm

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,16 +210,26 @@ var/auxtools_path
210210
..()
211211

212212
/world/proc/pre_shutdown()
213+
var/procWatch = start_watch()
214+
log_startup_progress("\[[time2text(world.realtime)]\]: Preshutdown begin")
215+
var/watch = start_watch()
213216
stop_all_media()
214-
217+
log_startup_progress("\[[time2text(world.realtime)]\]: stop_all_media finished in [stop_watch(watch)]s")
218+
log_startup_progress("\[[time2text(world.realtime)]\]: beginning html_interfaces shutdown")
219+
watch = start_watch()
215220
for(var/datum/html_interface/D in html_interfaces)
216221
D.closeAll()
217-
222+
log_startup_progress("\[[time2text(world.realtime)]\]: html_interfaces finished in [stop_watch(watch)]s")
223+
log_startup_progress("\[[time2text(world.realtime)]\]: beginning master controller shutdown")
224+
watch = start_watch()
218225
Master.Shutdown()
219-
226+
log_startup_progress("\[[time2text(world.realtime)]\]: master controller finished in [stop_watch(watch)]s")
227+
log_startup_progress("\[[time2text(world.realtime)]\]: beginning end_credits")
228+
watch = start_watch()
220229
end_credits.on_world_reboot_start()
221230
sleep(max(10, end_credits.audio_post_delay))
222231
end_credits.on_world_reboot_end()
232+
log_startup_progress("\[[time2text(world.realtime)]\]: end_credits finished in [stop_watch(watch)]s")
223233

224234
for(var/client/C in clients)
225235
if(config.server) //if you set a server location in config.txt, it sends you there instead of trying to reconnect to the same world address. -- NeoFite
@@ -231,7 +241,7 @@ var/auxtools_path
231241
#if AUXTOOLS_DEBUGGER
232242
call_ext(auxtools_path, "auxtools_shutdown")()
233243
#endif
234-
244+
log_startup_progress("\[[time2text(world.realtime)]\]: preshutdown finished in [stop_watch(procWatch)]s")
235245
#define INACTIVITY_KICK 6000 //10 minutes in ticks (approx.)
236246
/world/proc/KickInactiveClients()
237247
spawn(-1)

0 commit comments

Comments
 (0)