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

When using multiple playback dolphins, every SlippiSpectateServer after the first fails to start #419

Closed
jmlee337 opened this issue Mar 29, 2024 · 1 comment · Fixed by #421

Comments

@jmlee337
Copy link
Contributor

jmlee337 commented Mar 29, 2024

this is because there is no mechanism to try a different port then the default (there also doesn't appear to be any way to change the default):

server_address.port = SConfig::GetInstance().m_spectator_local_port;
// Create the spectator server
// This call can fail if the system is already listening on the specified port
// or for some period of time after it closes down. You basically have to just
// retry until the OS lets go of the port and we can claim it again
// This typically only takes a few seconds
ENetHost *server = enet_host_create(&server_address, MAX_CLIENTS, 2, 0, 0);
int tries = 0;
while (server == nullptr && tries < 20)
{
server = enet_host_create(&server_address, MAX_CLIENTS, 2, 0, 0);
tries += 1;
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
}
if (server == nullptr)
{
WARN_LOG(SLIPPI, "Could not create spectator server");
enet_deinitialize();
return;
}

adding an Ishii command-line option to set the SlippiSpectateServer port would alleviate this problem

@vladfi1
Copy link
Contributor

vladfi1 commented Jun 2, 2024

Note that you can set this in Dolphin.ini:

[Core]
SlippiEnableSpectator=True
SlippiSpectatorLocalPort=12345

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 a pull request may close this issue.

2 participants