Close sqlite persistent connection on SIGINT, SITERM or SIGKILL

Upstream-commit: 464ded79fcd46dbdf8859811912a244006626e86
Component: engine
This commit is contained in:
Solomon Hykes
2013-10-26 14:28:53 -07:00
parent ae44c03557
commit b744ea13a4

View File

@ -62,6 +62,7 @@ func (srv *Server) Daemon() error {
sig := <-c
log.Printf("Received signal '%v', exiting\n", sig)
utils.RemovePidFile(srv.runtime.config.Pidfile)
srv.Close()
os.Exit(0)
}()