swagin
swagin copied to clipboard
Crash when modifying request
This bug is related to the request value that is shared among all the requests. This crashed application when the request value is modified as in the example code. This is demonstrated in example application in the archive.
To run test, you must install test tool Hey. Then you can run application with make run
and run test with make test
.
The application will crash with a message like this:
fatal error: concurrent map iteration and map write
This is due to the fact that the request value is shared among all the requests. The request value is modified in the handler function and this causes the crash.