node_debug icon indicating copy to clipboard operation
node_debug copied to clipboard

reconnecting the console listener if node restarts

Open Marak opened this issue 16 years ago • 4 comments

what do you think about adding something to the long poll that will allow it to automatically reconnect if the node instance goes down and then comes back up.

i'm constantly having to reload the entire debugger page on node restart to re-establish the connection.

Marak avatar Jan 16 '10 05:01 Marak

Sounds like a good idea, I probably won't have time to implement it for a little while though.

Connorhd avatar Jan 16 '10 15:01 Connorhd

i might have some time next week to play with this.

i think all you need is an error listener on the jQuery ajax call that will restart the call (after a short delay) if it dies for any reason. the key here is the delay as you don't want the browser to send out too many reconnect attempts.

Marak avatar Jan 16 '10 23:01 Marak

It would be worth displaying a notice in the console that the connection was lost and re-established.

Connorhd avatar Jan 17 '10 01:01 Connorhd

/agreed

Marak avatar Jan 17 '10 10:01 Marak