swagin icon indicating copy to clipboard operation
swagin copied to clipboard

Crash when modifying request

Open c4s4 opened this issue 1 year ago • 0 comments

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.

test.zip

c4s4 avatar Jun 20 '23 09:06 c4s4