Defer DB closing in main.
This commit is contained in:
parent
a5e8af44d6
commit
9452194c83
@ -49,6 +49,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
hand := http.NewHandlers(*captchaExpiry, *databasesPath, *guestbookOwner, *guestbookPageSize)
|
hand := http.NewHandlers(*captchaExpiry, *databasesPath, *guestbookOwner, *guestbookPageSize)
|
||||||
|
defer hand.CloseDB()
|
||||||
srv := http.NewHttpServer()
|
srv := http.NewHttpServer()
|
||||||
|
|
||||||
srv.SetNotFoundHandler(hand.NotFound)
|
srv.SetNotFoundHandler(hand.NotFound)
|
||||||
|
Loading…
Reference in New Issue
Block a user