express icon indicating copy to clipboard operation
express copied to clipboard

Browser Connection Close Detection Problem?

Open pyrostrex opened this issue 16 years ago • 1 comments

Well, I'm currently trying to find the way to detect the browser connection close. I've compared this module with "Grasshopper" and overall this is much more fun but the only problem is i can't get this simple code to work in "Express" but it works in Grasshopper. Do any of you here got any way on how to do this?. Here is my code for grasshopper.

this.request.connection.on('close', function(error){
    console.log('Browser Connection Closed!');
});

Which when i translated to "Express" would be something similar to this:

request.connection.on('close', function(error){
    console.log('Browser Connection Closed!');
});

pyrostrex avatar Sep 05 '10 13:09 pyrostrex

Nvm, When i do some more testing, It actually not the modules fault.

pyrostrex avatar Sep 05 '10 14:09 pyrostrex