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

Fixed ListenToSocketInternal so it works after Jellyfin 10.9.2 #51

Merged
merged 3 commits into from
May 26, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions src/Rssdp/SsdpCommunicationsServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,21 @@
if (result.ReceivedBytes > 0)
{
var remoteEndpoint = (IPEndPoint)result.RemoteEndPoint;
var localEndpointAdapter = _networkManager.GetAllBindInterfaces().First(a => a.Index == result.PacketInformation.Interface);

var allBindInterfaces = _networkManager.GetAllBindInterfaces();
IPData localEndpointAdapter;
if (
allBindInterfaces.Count == 1
&& (
allBindInterfaces.First().Address.Equals(IPAddress.Any)
|| allBindInterfaces.First().Address.Equals(IPAddress.IPv6Any)
)
)
{
localEndpointAdapter = allBindInterfaces.First();
} else
crobibero marked this conversation as resolved.
Show resolved Hide resolved
{
localEndpointAdapter = allBindInterfaces.First(a => a.Index == result.PacketInformation.Interface);
}
Fixed Show fixed Hide fixed
ProcessMessage(
Encoding.UTF8.GetString(receiveBuffer, 0, result.ReceivedBytes),
remoteEndpoint,
Expand Down
Loading