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

Improve 3DS Reliability #87

Merged
merged 2 commits into from
Feb 3, 2024

Conversation

zoeyjodon
Copy link
Contributor

Overview

This MR improves moonlight's reliability on the 3DS, mostly around socket connections. Since adding these changes, the 3DS app went from crashing within minutes of connecting to the server to being able to hold a stable connection with the host for hours on end.

Changelog

  • Simplifies thread priority setup
  • Sets a max socket buffer size of 0x20000 for the 3DS
  • Fixes a bug with polling timeouts taking longer than intended
  • Removes 3DS global socket definition

src/Platform.c Show resolved Hide resolved
Limelog("Set rcv buffer size failed: %d\n", err);
closeSocket(s);
SetLastSocketError(err);
return INVALID_SOCKET;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want this error to be a hard failure.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, I wasn't sure whether or not it should be an error for other platforms. I think it's a good idea to the limelog print though, since it causes some serious stability issues on the 3DS that are otherwise kinda hard to find if it fails.

@cgutman
Copy link
Member

cgutman commented Feb 2, 2024

Can you rebase this PR to get rid of those commits that touch the enet submodule? Those prevent the PR from being mergeable through the GitHub UI.

Reduce thread stack sizes (match vita)
Set a maximum receive buffer size for 3DS sockets
Remove global socket setting
@cgutman cgutman merged commit 35f730f into moonlight-stream:master Feb 3, 2024
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.

2 participants