Disconnect event gets fired 2 minutes later
===

I'm using Node.JS and Socket.IO to create a chat, I use XHR polling with a duration of 10 to host it on Heroku.

When I leave the page with my client, I'd like to calll the disconnect method automatically on the server which removes it from other clients. It's in fact done but... 2 minutes after the client has really left the page, which is quite awkward.

Is there a way to call the disconnect method as soon as the client doesn't reply ? Or at least being a little faster to know when the client is not there anymore ?

I've tried to close the socket client-side on page exit with jQuery but it doesn't work.