Commit Graph

14 Commits

Author SHA1 Message Date
Ivan Kozlovic
bdf5cf63b3 Shutdown on Ctrl+C
Changed code on Windows to not use svc code if running in interactive
mode. The original code was running svc.debug.Run() which uses service
code (Execute()) but from the command line. We don't need that.

Also reduced salt on bcrypt password for a config file that started
to cause failures due to test taking too long to finish.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-11-14 20:05:32 -07:00
Derek Collison
acfe372d63 Changes for rename from gnatsd -> nats-server
Signed-off-by: Derek Collison <derek@nats.io>
2019-05-06 15:04:24 -07:00
Ivan Kozlovic
0067c3bb04 Added support for lame duck mode
When receiving SIGUSR2 signal (or -sl ldm) the server stops
accepting new clients, closes routes connections and spread the
closing of client connections based on a config lame duck duration
(default is 30sec). This will help preventing a storm of client
reconnect when a server needs to be shutdown.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-10-19 19:07:37 -06:00
Derek Collison
00901acc78 Update license to Apache 2 2018-03-15 22:31:07 -07:00
Tyler Treat
99015c4117 Allow specifying service name for Windows signaling 2017-06-27 12:42:48 -05:00
Tyler Treat
82f92e0939 Refactor signalling and add tests 2017-06-27 11:25:34 -05:00
Tyler Treat
2e6421683b Consolidate duplicate switch cases 2017-06-27 09:38:01 -05:00
Tyler Treat
4eea6f1557 Fix custom windows service control code 2017-06-26 17:39:17 -05:00
Tyler Treat
15ac59211a Use custom code to signal log file reopen 2017-06-26 15:18:57 -05:00
Tyler Treat
81e94ae4f1 Implement Windows service signalling 2017-06-26 11:41:53 -05:00
Tyler Treat
96ca09ee21 Add --signal flag 2017-06-26 10:50:23 -05:00
Stephen JANNIN
7db8a49468 fix windows build 2017-06-07 15:43:11 +02:00
Colin Sullivan
e9dc5fa054 Updates based on comments 2016-11-22 16:22:51 -07:00
Colin Sullivan
ccca711edd Differentiate signal handling for windows.
Windows has limited support for signals, and does not define syscall.SIGUSR1.  Log rotation will be handled differently in windows.

* Add signal.go for all non-windows builds
* Add signal_windows.go for windows builds.

Today, windows looks to be the only platform that does not have syscall.SIGUSR1 defined.
2016-11-22 15:22:34 -07:00