zenhack / ttrss-sandstorm

Sandstorm port of Tiny Tiny RSS
GNU General Public License v3.0
6 stars 2 forks source link

Handle multiple clients open gracefully. #3

Closed zenhack closed 3 years ago

zenhack commented 3 years ago

Right now, when a client opens a websocket to the proxy server in order to handle powerbox requests, The server will drop the previous connection, if any.

Since the client will also try to re-establish the connection, this results in a situation where if a user has the grain open in two browser tabs (or on two machines, or different users are viewing the same grain...), the connections will be continuously booting one another. Furthermore, when a request is made, the powerbox request will be sent to whichever connection is active at the time, which may not correspond to the client that triggered the request (if any).

One possible alternative is to allow multiple connected clients, broadcast the powerbox requests, and use the first response received.