uNetworking / uWebSockets.js

μWebSockets for Node.js back-ends :metal:
Apache License 2.0
7.86k stars 569 forks source link

Question: should I reply with error in res.onAborted callback? #744

Closed piliugin-anton closed 2 years ago

piliugin-anton commented 2 years ago

Hello. Thank for your work, I really enjoy working with your library. I'm asking about callback from this example: https://github.com/uNetworking/uWebSockets.js/blob/fbfc250451a917f6361832f2efd123382470516a/examples/JsonPost.js#L71

Should I reply with some error code or this callback is only an indication that user aborted page loading and I don't need to do anything? Thanks in advance!

ghost commented 2 years ago

You don't need to do anything the connection is broken

piliugin-anton commented 2 years ago

Do I get your code right: I can add as many callbacks for onAborted as I want, but only last one added will be called?