fixed missing lock in demo expire update

This commit is contained in:
2021-10-05 04:52:34 +02:00
parent 1efc7c48be
commit c0b8de24f7

View File

@@ -128,7 +128,9 @@ func (p *DemoParser) parseWorker() {
if err != nil {
switch e := err.(type) {
case DemoNotFoundError:
p.lock.Lock()
err := tMatch.Update().SetDemoExpired(true).Exec(context.Background())
p.lock.Unlock()
if err != nil {
log.Errorf("[DP] Unable to set demo expire for match %d: %v", demo.MatchId, e)
continue