Skip to content

Conversation

@xboxfanj
Copy link
Contributor

  • Added "Reconnect to server" option in File menu between directories and exit
  • Implements complete connection state reset like app restart to fix reconnection issues
  • Resets critical state variables (_running, _lastGlobalUpdate, _lastPlayerUpdate, reconnecting)
  • Uses proper protocol cleanup via destroyProtocol() and fresh SyncClientFactory
  • Includes 2-second delay to prevent server-side rate limiting
  • Adds comprehensive error handling and user feedback messages
  • Fixes poor connection handling after network drops or computer suspend/resume

Resolves issues where users had to quit and restart Syncplay after connection timeouts.

@Et0h
Copy link
Contributor

Et0h commented Sep 14, 2025

I'll need to test the implementation out before I can accept it, but a reconnect button sounds like a great idea to me.

@Et0h
Copy link
Contributor

Et0h commented Sep 14, 2025

It might be more straightforward to go for a different approach, which is to create a method in client for manualReconnect in the client which displays a message then calls factory.retry() (potentially via a callLater or something for threading purposes) which the GUI calls.

Something that will need to be assessed if we were to stick with your proposed implementation is to look into is whether all the relevant code from client.py's retry code at https://github.com/Syncplay/syncplay/blob/master/syncplay/client.py#L873-L908 such as self.ui.setSSLMode(False) and self.playlistMayNeedRestoring = True.

Resolves issues where users had to quit and restart Syncplay after connection times out.
@xboxfanj
Copy link
Contributor Author

Hey @Et0h I updated the commit based on your feedback. I agree with making the logic common so that if it ever changes, it'll affect both paths. Please let me know if you would like me to make any other changes.

@Et0h Et0h requested a review from daniel-123 October 20, 2025 19:35
@Et0h
Copy link
Contributor

Et0h commented Oct 21, 2025

@xboxfanj I've done some testing of the feature and it seems to work fine from what I can tell and the code looks okay. What level of testing have you done on this feature so far?

@xboxfanj
Copy link
Contributor Author

@Et0h I tested suspend/resume extensively. In the current state, that will never automatically reconnect. With this change, I can select the Reconnect button and it successfully reconnects. Network changes already seem to trigger the automatic reconnect in the current state.

@Et0h
Copy link
Contributor

Et0h commented Oct 22, 2025

That's good to hear @xboxfanj - I must say, I hadn't thought of the scenario where someone suspends/resumes their machine and how Syncplay would behave in such a circumstance.

@Et0h Et0h merged commit d71493d into Syncplay:master Nov 5, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants