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:
parent
b94bcf743e
commit
6abd30d71c
3 changed files with 40 additions and 23 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue