in Source/Tx.Network/Udp/BaseUdpReceiver.cs [150:185]
public void Dispose()
{
if (!this.disposeCalled)
{
this.disposeCalled = true;
if (this.socket != null)
{
try
{
this.socket.Shutdown(SocketShutdown.Both);
this.socket.Dispose();
}
catch
{
// ignored
}
this.socket = null;
}
if (this.disposeables != null)
{
foreach (var toDispose in this.disposeables)
{
toDispose.Dispose();
}
}
this.packetSubject.OnCompleted();
this.packetSubject.Dispose();
}
}