alexedwards / scs

HTTP Session Management for Go
MIT License
2.13k stars 166 forks source link

fix data race in generateContextKey #93

Closed verygoodsoftwarenotvirus closed 4 years ago

verygoodsoftwarenotvirus commented 4 years ago

Hi,

I found this data race while trying to integrate scs into a project of mine. While you were (appropriately) enabling the race detector, your tests weren't being run in parallel, so the races were never caught. I've added the parallel flag to every test to avoid regressions, and fixed the data race.

Let me know if there is anything further I could do to be helpful. :)

alexedwards commented 4 years ago

Great spot! Thank you.