You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, it seems to be a problem when the same instance of PainlessHttp is handling multiple request at the same time (thread-unsafe?).
I have the following code in a ApiController-class:
[Route("api/test")][HttpGet]publicasyncTask<IHttpActionResult>Test(stringid="0"){varresponse=awaithttpSingleton.GetAsync<string>(string.Format("/echo/{0}",id));// Replies with `id`returnOk(response.Body);}
and if I make a several requests at the same time against the endpoint above (api/test/?id={id}) I can get the response all mixed up. Eg. GET api/test/1 can reply "2" (expected 1) and GET api/test/2 can reply "1" (expected 2).
Hi,
First of all, awesome project!
However, it seems to be a problem when the same instance of
PainlessHttp
is handling multiple request at the same time (thread-unsafe?).I have the following code in a
ApiController
-class:and if I make a several requests at the same time against the endpoint above (
api/test/?id={id}
) I can get the response all mixed up. Eg.GET api/test/1
can reply "2" (expected 1) andGET api/test/2
can reply "1" (expected 2).Take a look at my gist to get a full example: https://gist.github.com/tjoskar/c1f65bed89d67a503728
Keep up the good work!
The text was updated successfully, but these errors were encountered: