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>
This commit is contained in:
Ivan Kozlovic
2019-11-14 18:47:02 -07:00
parent c2d2307670
commit bdf5cf63b3
10 changed files with 11 additions and 110 deletions

View File

@@ -17,6 +17,7 @@ import (
"flag"
"fmt"
"os"
"runtime"
"github.com/nats-io/nats-server/v2/server"
)
@@ -109,4 +110,5 @@ func main() {
if err := server.Run(s); err != nil {
server.PrintAndDie(err.Error())
}
runtime.Goexit()
}