Close DB on shutdown
This commit is contained in:
parent
1b8d8d08c9
commit
410ba47277
@ -106,6 +106,10 @@ func (s *Server) Shutdown() {
|
|||||||
s.lock.Unlock()
|
s.lock.Unlock()
|
||||||
|
|
||||||
s.stopWG.Wait()
|
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) {
|
func (s *Server) createUser(user *User) (*user, error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user