Skip to content

Commit

Permalink
Fix crash on UPnP discovering
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienwarin committed Nov 15, 2019
1 parent 0188e60 commit 19addef
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions DeveloperToolsForUPnPTechnologies/UPnP/UPnPDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1416,6 +1416,12 @@ private void HandleSearch(String ST, IPEndPoint src, IPEndPoint local)
ArrayList ResponseList = new ArrayList();
HTTPMessage msg;
string Location = null;

if (!WebServerTable.ContainsKey(local.Address.ToString()))
{
NewDeviceInterface(null, local.Address);
}

if (local.AddressFamily == AddressFamily.InterNetwork)
{
Location = "http://" + local.Address.ToString() + ":" + ((MiniWebServer)WebServerTable[local.Address.ToString()]).LocalIPEndPoint.Port.ToString() + "/";
Expand Down

0 comments on commit 19addef

Please sign in to comment.