Closed dyc3 closed 3 years ago
While stress testing my ssw project, I encountered this race condition. It occurs in the code below:
func (hb *httpBattle) QueueNextTurn(targetId int, turn Turn) { hb.queuedTurns[targetId] = turn }
Should be easily fixed with a lock.
To Reproduce Queue multiple turns for the same battle at the same time.
Should not crash.
Evironment:
Additional context Add any other context about the problem here.
Current Behavior
While stress testing my ssw project, I encountered this race condition. It occurs in the code below:
Should be easily fixed with a lock.
To Reproduce Queue multiple turns for the same battle at the same time.
Expected Behavior
Should not crash.
Evironment:
Additional context Add any other context about the problem here.