HolyLib Wiki

HolyLib:DetermineServerCrash

 boolean HolyLib:DetermineServerCrash( number lagTime )

Description

Called by HolyLib's watchdog thread right before it forcefully terminates the server for appearing frozen, giving you one last chance to cancel it.

This hook is called inside HolyLib's separate holylua interface, not the gamemode's normal Lua state.
This is intentional - the watchdog exists specifically to catch the case where the normal Lua state's thread is stuck/deadlocked and can no longer respond, so it consults the independent holylua state instead. It is only called while that interface is running (See holylib_lua).

Arguments

1number lagTime

how long, in milliseconds, the server has been detected as frozen for

Returns

1boolean cancelCrash

return true to cancel the pending termination and reset the watchdog's lag counter. Returning anything else (or nothing) lets the server be terminated