all repos — honk @ 0e01abbd38692c179c4507d18e01d80cc69550ff

my fork of honk

mutex to preserve the integrity of some seriously important data
Ted Unangst tedu@tedunangst.com
Tue, 09 Feb 2021 18:48:36 -0500
commit

0e01abbd38692c179c4507d18e01d80cc69550ff

parent

7803f26d7c744cefcb5c1793e2af479581dc44c2

1 files changed, 5 insertions(+), 0 deletions(-)

jump to
M database.godatabase.go

@@ -26,6 +26,7 @@ "log"

"sort" "strconv" "strings" + "sync" "time" "humungus.tedunangst.com/r/webs/cache"

@@ -804,7 +805,11 @@ }

return nil } +var baxonker sync.Mutex + func addreaction(user *WhatAbout, xid string, who, react string) { + baxonker.Lock() + defer baxonker.Unlock() h := getxonk(user.ID, xid) if h == nil { return