mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-06 05:05:40 +12:00
add graceful exit on SIGKILL/SIGTERM
This commit is contained in:
parent
e42b0bf782
commit
ca39f783b9
6 changed files with 15 additions and 7 deletions
|
@ -62,6 +62,8 @@ namespace HISP.Cli
|
|||
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
AppDomain.CurrentDomain.ProcessExit += ProcessQuitHandler;
|
||||
|
||||
string BaseDir = Directory.GetCurrentDirectory();
|
||||
Logger.SetCallback(LogStdout);
|
||||
|
||||
|
@ -132,5 +134,10 @@ namespace HISP.Cli
|
|||
shutdownHandle = new EventWaitHandle(false, EventResetMode.ManualReset);
|
||||
shutdownHandle.WaitOne();
|
||||
}
|
||||
|
||||
private static void ProcessQuitHandler(object sender, EventArgs e)
|
||||
{
|
||||
GameServer.ShutdownServer();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
|
|||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.7.20.0")]
|
||||
[assembly: AssemblyFileVersion("1.7.20.0")]
|
||||
[assembly: AssemblyVersion("1.7.21.0")]
|
||||
[assembly: AssemblyFileVersion("1.7.21.0")]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Package: hisp
|
||||
Version: 1.7.20
|
||||
Version: 1.7.21
|
||||
Depends: coreutils,systemd,mariadb-server,libsqlite3-dev,zlib1g-dev,libicu-dev,libkrb5-dev
|
||||
Maintainer: Li
|
||||
Homepage: https://islehorse.com
|
||||
|
|
|
@ -30,5 +30,5 @@ using System.Runtime.InteropServices;
|
|||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.7.20.0")]
|
||||
[assembly: AssemblyFileVersion("1.7.20.0")]
|
||||
[assembly: AssemblyVersion("1.7.21.0")]
|
||||
[assembly: AssemblyFileVersion("1.7.21.0")]
|
||||
|
|
|
@ -8258,6 +8258,7 @@ namespace HISP.Server
|
|||
}
|
||||
public static void ShutdownServer()
|
||||
{
|
||||
Logger.InfoPrint("Shutting down.");
|
||||
GameClient.OnShutdown();
|
||||
GameServer.OnShutdown();
|
||||
Database.OnShutdown();
|
||||
|
|
|
@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
|
|||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.7.20.0")]
|
||||
[assembly: AssemblyFileVersion("1.7.20.0")]
|
||||
[assembly: AssemblyVersion("1.7.21.0")]
|
||||
[assembly: AssemblyFileVersion("1.7.21.0")]
|
||||
|
|
Loading…
Add table
Reference in a new issue