Skip to content

Commit

Permalink
Fixes "Platform Not supported Exception" (TBI)
Browse files Browse the repository at this point in the history
  • Loading branch information
genemars committed Dec 19, 2022
1 parent efb88d3 commit d48c564
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion UPnP/NetworkInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public NetworkInfo(InterfaceHandler onNewInterfaceSink)
NetworkInterface[] interfaces = NetworkInterface.GetAllNetworkInterfaces();
foreach (NetworkInterface i in interfaces)
{
#if NETSTANDARD
#if NET6_0_OR_GREATER
if (/*i.IsReceiveOnly == false &&*/ i.OperationalStatus == OperationalStatus.Up && i.SupportsMulticast == true)
#else
if (i.IsReceiveOnly == false && i.OperationalStatus == OperationalStatus.Up && i.SupportsMulticast == true)
Expand Down
8 changes: 4 additions & 4 deletions UPnP/SSDP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ private void SetupSessions()
OpenSource.Utilities.EventLogger.Log(ex);
// session.Client.Close();
}
#if NETSTANDARD
#if NET6_0_OR_GREATER
catch (NotSupportedException ex)
{
OpenSource.Utilities.EventLogger.Log(ex);
Expand All @@ -222,7 +222,7 @@ private void SetupSessions()
OpenSource.Utilities.EventLogger.Log(ex);
// usession.Client.Close();
}
#if NETSTANDARD
#if NET6_0_OR_GREATER
catch (NotSupportedException ex)
{
OpenSource.Utilities.EventLogger.Log(ex);
Expand Down Expand Up @@ -269,7 +269,7 @@ private void SetupSessions()
OpenSource.Utilities.EventLogger.Log(ex);
// session.Close();
}
#if NETSTANDARD
#if NET6_0_OR_GREATER
catch (NotSupportedException ex)
{
OpenSource.Utilities.EventLogger.Log(ex);
Expand All @@ -290,7 +290,7 @@ private void SetupSessions()
OpenSource.Utilities.EventLogger.Log(ex);
// usession.Close();
}
#if NETSTANDARD
#if NET6_0_OR_GREATER
catch (NotSupportedException ex)
{
OpenSource.Utilities.EventLogger.Log(ex);
Expand Down

0 comments on commit d48c564

Please sign in to comment.