Close sqlite persistent connection on SIGINT, SITERM or SIGKILL

This commit is contained in:
Solomon Hykes 2013-10-26 14:28:53 -07:00
parent c1ae1a0e1c
commit 464ded79fc
1 changed files with 1 additions and 0 deletions

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)
}()