I have a thttpcli which will be used for sending http postasync to my server, I found out that sometimes I will get the request done event with StatusCode as 0 and reasonphrase is empty and errocode is 0
Initially I was thinking it is my server problem, but then I found out that, in httpprot, it will perform a postmessage for triggering request done event, but before postmessage, the state already changed to httpready, which means the socket is ready for another eequest.
In my code, the socket is reuse, with every request, I will be checking the state if it is not ready, i will be adding my request to queue. If it is ready, request will be sent, once new request started, StatusCode, reasonphrase value will be reinit to 0 and empty, then only I received the onrequestdone event which previously was postmessage to wind message queue, at this moment the statuscode is no longer 200 as it was reinit
Is this known issue? Any workaround?
Thanks.