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

Catch exception on UPNP that cause socket problem when reconnecting after network fail #469

Merged
merged 8 commits into from
Dec 4, 2018
13 changes: 10 additions & 3 deletions neo/Network/UPnP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,16 @@ public static bool Discover()

DateTime start = DateTime.Now;

s.SendTo(data, ipe);
s.SendTo(data, ipe);
s.SendTo(data, ipe);
try
{
s.SendTo(data, ipe);
s.SendTo(data, ipe);
s.SendTo(data, ipe);
}
catch
{
return false;
}

byte[] buffer = new byte[0x1000];

Expand Down