[NodeJS] Abort workflow execution if client's HTTP request is aborted

I want the following PHP functionality into NodeJS:

<?php
ignore_user_abort(false); // Abort script execution if HTTP request aborted

ExpressJS, how to detect if client aborted the HTTP request:

app.get('/', function(req, res){
    req.on('close', function(){
        req.isDisconnected = true // I made this variable name, don't know if it's ok to set it like that
    });
});

On method exec of lib/modules/core.js, you could check the boolean req.isDisconnected before proceeding with the execution of the step, what do you think @patrick?

Community Page
Last updated: