Skip to content

uPnP discovery suddenly stopp working? #93

@ghost

Description

I am trying this but it does not always work:

using Rssdp;
using System;

namespace Discovery {
  class Program {
    static void Main(string[] args) {
      SearchForDevices();
      Console.ReadKey();
    }

    public static async void SearchForDevices() {
      using (var deviceLocator = new SsdpDeviceLocator()) {
        var foundDevices = await deviceLocator.SearchAsync();

        foreach (var foundDevice in foundDevices) {
          Console.WriteLine("Found " + foundDevice.Usn + " at " + foundDevice.DescriptionLocation.ToString());
        }
      }
    }
  }
}

It only shows output for the first 3 runs or so. Then for the rest of the day I get nothing. I have checked the firewall settings in windows and allowed UDP in and out on all ports. Still the same. Not even sure how to debug.

I am running this from .NET Core Console App, in Windows 10.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions