-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Possible bug.
- Verify MT engine behavior with completely invalid requests.
- Engine responds with
HTTPRequestResultdefinition then fix code. - Engine responds with
nilorfalsethen fix code by replacingerrorwith static return value. - Engine responds with crash then close this issue without fixing code.
- Engine responds with
If queue was full when adding request through fetch_async handle will be nil and error is thrown from fetch_async_get if called with invalid handle.
Possible fix (after actual behavior is verified)
Instead of returning invalid handle and throwing error on fetch_async_get it should return handle that looks fine but is well known marker for invalid requests that were canceled because queues were full already.
This can be easily done by returning 0 as handle and treating 0 as special marker for requests that does not exist at all.
If fetch_async_get is called with 0 as handle then it should return completed request with succeeded = false, timeout = false.
Most correct way to fill data and status would be to keep those empty if mt engine also does this for completely invalid requests.