Closed recursiveGecko closed 1 year ago
Hey, thanks for the PR. Question, does this still work with servers that are not using crossplay and are not public? I remember vaguely that non-public servers only ever listen on 2456 and never bind the query port.
Hi @lloesche, I verified that the server binds to both ports in the case you mentioned, but it doesn't actually seem to respond to queries.
> ss -ulp | egrep "245(6|7)"
UNCONN 1536 0 0.0.0.0:2457 0.0.0.0:* users:(("valheim_server.",pid=181,fd=21))
UNCONN 0 0 *:2456 *:* users:(("valheim_server.",pid=181,fd=32))
This means that the original implementation worked correctly, but I've amended the server listening check anyway to include both ports - just to be safe.
I rebased my branch to include latest commits from main
.
+1, This looks like a good solution.
Resolves #521, #515