Close DB on shutdown

This commit is contained in:
Simon Ser 2021-10-05 11:53:38 +02:00
parent 1b8d8d08c9
commit 410ba47277

View file

@ -106,6 +106,10 @@ func (s *Server) Shutdown() {
s.lock.Unlock()
s.stopWG.Wait()
if err := s.db.Close(); err != nil {
s.Logger.Printf("failed to close DB: %v", err)
}
}
func (s *Server) createUser(user *User) (*user, error) {