m1k1o / neko

A self hosted virtual browser that runs in docker and uses WebRTC.
https://neko.m1k1o.net/
Apache License 2.0
5.96k stars 449 forks source link

add reconnect after WebSocket Timeout(server restart) #268

Closed urbanekpj closed 5 months ago

urbanekpj commented 1 year ago

and

i try use auto login via url params. but if server is restarted then auto connect/reconnect/retry no working. as far as i check code retry is more focused on webrtc connection not on webscoket?

on PR some changes to add reconnect when ws raport timeout. but i'm not sure what was original logic in connect.vue ( members was not set in onMounted?).

also not sure if

if (reason?.message == 'connection timeout') {

is correct way to check Error. also maybe cancel button should be added if connection is true?

m1k1o commented 1 year ago

Yes, we do not have currently proper websocket reconnection logic. And even whole neko session is bound to living websocket connection.

We should add some kind of reconnect function, that will perform websocket reconnection without any arguments. Because now we need to know username & password.

And also I would say, that reconnection should be happening when we discover that we are not connected and should be. Not only connection timeout.