webssh2 icon indicating copy to clipboard operation
webssh2 copied to clipboard

reconnection when server websocket available again

Open mattpass opened this issue 8 years ago • 2 comments

If the Node webserver is stopped, it'll cause the terminal to stop working, which is understandable. If I start the Node webserver again, it won't allow the terminal to continue working.

I've found the socket.io.reconnection(false) line, which if I remove, does then allow reconnection and the terminal to work, but then the terminal outputs extra line breaks after each line.

Is there anyway to get reconnections to work and allow the terminal to keep functioning as it was, without the extra line breaks?

mattpass avatar Jan 12 '18 16:01 mattpass

I've been able to stop the extra line breaks happening but the user interaction and further display of stdout etc is still an issue. (ie, each time I type a character it seems to send/receive two).

This avoids the extra line breaks after each line displayed anyway, so reconnects possible, but weird doubling up of comms:

// socket.io.reconnection(false) // Comment this out
socket.io.disconnect()
socket = socket.io.connect()

mattpass avatar Jan 12 '18 17:01 mattpass

Will look into this as a future enhancement.

billchurch avatar Jan 18 '18 13:01 billchurch