Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for more asynchronous chat #1296

Open
micahflee opened this issue Feb 24, 2021 · 1 comment
Open

Support for more asynchronous chat #1296

micahflee opened this issue Feb 24, 2021 · 1 comment

Comments

@micahflee
Copy link
Collaborator

I received some feedback about chat. Right now if you start a chat server and then wait for someone to join, and your screen locks, the websocket connection in Tor Browser disconnects. So if you later unlock your screen and connect again, you miss anything that happened while you were gone.

I wonder how we can improve this, at least for the host who's running OnionShare. @SaptakS

@SaptakS
Copy link
Member

SaptakS commented Feb 24, 2021

Yes. This has been an issue I am aware of. Tor drops the websocket connections if there has been no activity for a long time. Given that the socket server in the onionshare server side is still running, the only way probably would be to detect that the client is no longer connected to the websocket, and then retry connecting.

Theoretically that should be possible. There are 2 main steps (and both need some looking into):

  1. A good way to detect you are disconnected (i.e. detect that it is dropped via tor and not the actual chat server stopped)
  2. Once detected, try to reconnect to the server again (not sure if this will actually be as easy as making a reconnect or a new connect from JS, or need some other strategy)

This is clearly a tor/tor brrowser phenomenon (not sure about the intricacies), because if a server is started locally and visited by local link, this issue doesn't appear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants