public void ReleaseTransport(ITransport transport) { try { if (transportCollection.ContainsKey(transport.IpEndPoint().Address.ToString() + ":" + transport.IpEndPoint().Port)) { transportCollection[transport.IpEndPoint().Address.ToString() + ":" + transport.IpEndPoint().Port].Add(transport); } else { HashSet<ITransport> newSet = new HashSet<ITransport>(); newSet.Add(transport); transportCollection.Add(transport.IpEndPoint().Address.ToString() + ":" + transport.IpEndPoint().Port, newSet); } } catch (Exception e) { throw new TransportException("Failed to release transport : " + e); } }