mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
don't initiate graceful shutdown twice
This commit is contained in:
@@ -23,9 +23,14 @@ void handle_signal(int sig)
|
|||||||
i2p::log::Logger().Reopen ();
|
i2p::log::Logger().Reopen ();
|
||||||
break;
|
break;
|
||||||
case SIGINT:
|
case SIGINT:
|
||||||
i2p::context.SetAcceptsTunnels (false);
|
if (i2p::context.AcceptsTunnels () && !Daemon.gracefullShutdownInterval)
|
||||||
Daemon.gracefullShutdownInterval = 10*60; // 10 minutes
|
{
|
||||||
LogPrint(eLogInfo, "Graceful shutdown after ", Daemon.gracefullShutdownInterval, " seconds");
|
i2p::context.SetAcceptsTunnels (false);
|
||||||
|
Daemon.gracefullShutdownInterval = 10*60; // 10 minutes
|
||||||
|
LogPrint(eLogInfo, "Graceful shutdown after ", Daemon.gracefullShutdownInterval, " seconds");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Daemon.running = 0;
|
||||||
break;
|
break;
|
||||||
case SIGABRT:
|
case SIGABRT:
|
||||||
case SIGTERM:
|
case SIGTERM:
|
||||||
|
|||||||
Reference in New Issue
Block a user