spacebarchat / client

Open source, themeable and extendable discord-compatible native Spacebar client
GNU Affero General Public License v3.0
475 stars 90 forks source link

potentially stale client spams server #348

Open habys opened 2 months ago

habys commented 2 months ago

Describe the bug After some amount of time, both the dev and release client, if left idle long enough (and maybe related to the laptop going to sleep and waking up) can no longer communicate correctly with the server, and spams the server with these errors:

Jul 26 22:38:49 server npm[4966]: [WebSocket] closed 4009

somewhere between 2-5 per second.

To Reproduce Steps to reproduce the behavior:

  1. use either dev.app.spacebar.com or app.spacebar.com and connect a server
  2. wait long enough for the session to expire
  3. the client will no longer be able to send messages nor refresh the session
  4. you will see the error messages spam the server

Expected behavior session either re-initializes, or if that is impossible, the client stops trying to connect to the server and informs the user to refresh the page or whatever is appropraite.

Console Logs

Jul 26 22:38:49 server npm[4966]: [WebSocket] closed 4009

System Information (please complete the following information):

Env and Software info