shutdown your background workers!
I believe everything #74 was caused by not shutting down the userDaemon when we do a pseudo-restart. shutdown of it and the invite daemon are now deferred so this should fix any problems and reduce log spam.
This commit is contained in:
@@ -42,6 +42,13 @@ func (rt *userDaemon) run() {
|
||||
}
|
||||
}
|
||||
|
||||
func (rt *userDaemon) shutdown() {
|
||||
rt.Stopped = true
|
||||
rt.ShutdownChannel <- "Down"
|
||||
<-rt.ShutdownChannel
|
||||
close(rt.ShutdownChannel)
|
||||
}
|
||||
|
||||
func (app *appContext) checkUsers() {
|
||||
if err := app.storage.loadUsers(); err != nil {
|
||||
app.err.Printf("Failed to load user expiries: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user