uNetworking/uWebSockets.js

Aborted called on a running task

RJ4100 opened this issue · 2 comments

Is there a way to prevent aborted being called for a specific call? I want to wait until the function completes. I see this example: if (!res.aborted) {
res.cork(() => {
res.end(r);
});
}

However, I need a way to respond to the user when the res is done or aborted. I see the request aborts in 3 seconds. I'm looking to increase timeout to like 4 seconds.

prevent aborted being called

If the peer disconnects, which can happen at any time, you technically have no way to respond. You can't prevent this.

"Aborted called on a running task" <- this caption is good. I understand what you mean. But there is no technical way to prevent this, you need to either let your running task complete and then discard it if aborted, or support prematurely breaking the running task. Either solution will work.