Skip to content

Commit

Permalink
Removed unneccessary disposal of senders.
Browse files Browse the repository at this point in the history
  • Loading branch information
queequac committed Sep 18, 2020
1 parent fd508bf commit c8c771f
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions src/MulticastClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -219,20 +219,7 @@ protected virtual void Dispose(bool disposing)
}
receivers.Clear();

foreach (var address in senders.Keys)
{
if (senders.TryRemove(address, out var sender))
{
try
{
sender.Dispose();
}
catch
{
// eat it.
}
}
}
// senders are a subset of reiceivers (listening for answers to unicast queries), so no need to dispose this list.
senders.Clear();
}

Expand Down

0 comments on commit c8c771f

Please sign in to comment.