public void HandleInboundPeerIdentityUpdate(Identity identity) { // logger.Trace($"Got announcement from peer {identity}!"); Identity.Update(identity); if (Interlocked.CompareExchange(ref discoveryState, kDiscovered, kNotDiscovered) == kNotDiscovered) { Go(async () => { var discoveryEvent = new PeerDiscoveryEvent { Peer = this }; await peerDiscoveryEventPoster.PostAsync(discoveryEvent).ConfigureAwait(false); discoveryLatch.Set(); }).Forget(); } }
public void HandleInboundPeerIdentityUpdate(Identity identity) { // logger.Trace($"Got announcement from peer {identity}!"); Identity.Update(identity); if (Interlocked.CompareExchange(ref discoveryState, kDiscovered, kNotDiscovered) == kNotDiscovered) { Go(async() => { var discoveryEvent = new PeerDiscoveryEvent { Peer = this }; await peerDiscoveryEventPoster.PostAsync(discoveryEvent).ConfigureAwait(false); discoveryLatch.Set(); }).Forget(); } }