1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-09-16 10:06:54 +00:00

fix race condition with lastSuccess

convert responseCache
This commit is contained in:
Kane York 2016-06-02 08:59:40 -07:00
parent b94bcf743e
commit 6abd30d71c
3 changed files with 40 additions and 23 deletions

View file

@ -114,11 +114,9 @@ func SetupServerAndHandle(config *ConfigFile, serveMux *http.ServeMux) {
log.Println("could not announce startup to backend:", err)
} else {
resp.Body.Close()
lastBackendSuccess[bPathAnnounceStartup] = time.Now().UTC()
}
if Configuration.UseESLogStashing {
// logstasher.Setup(Configuration.ESServer, Configuration.ESIndexPrefix, Configuration.ESHostName)
Backend.lastSuccessLock.Lock()
Backend.lastSuccess[bPathAnnounceStartup] = time.Now().UTC()
Backend.lastSuccessLock.Unlock()
}
janitorsOnce.Do(startJanitors)