I didn’t know the ignore_user_abort
function in PHP. But it seems to have a flaw, from the Notes in the documentation: PHP will not detect that the user has aborted the connection until an attempt is made to send information to the client.
. Since we only send content to the client after the action finished it will not abort.
On NodeJS it could work, but you could get some unwanted behavior if you don’t handle it well. Perhaps we could throw an error if the user disconnects so that you can still catch it and do some database rollback or other actions that are required.