Skip to content

Commit

Permalink
Update NoiseProtocol.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
rose2221 authored Aug 22, 2024
1 parent bef6bc2 commit 475c0c3
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/libp2p/Libp2p.Protocols.Noise/NoiseProtocol.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ public async Task DialAsync(IChannel downChannel, IChannelFactory? upChannelFact
List<string> responderMuxers = msg1Decoded.Extensions.StreamMuxers
.Where(m => !string.IsNullOrEmpty(m))
.ToList();

IProtocol commonMuxer = multiplexerSettings.Multiplexers.FirstOrDefault(m => responderMuxers.Contains(m.Id));

if (commonMuxer != null)
{
context.SpecificProtocolRequest = new ChannelRequest
Expand Down Expand Up @@ -163,9 +161,7 @@ public async Task ListenAsync(IChannel downChannel, IChannelFactory? upChannelFa
List<string> initiatorMuxers = msg2Decoded.Extensions.StreamMuxers
.Where(m => !string.IsNullOrEmpty(m))
.ToList();

IProtocol commonMuxer = multiplexerSettings.Multiplexers.FirstOrDefault(m => initiatorMuxers.Contains(m.Id));

IProtocol commonMuxer = multiplexerSettings.Multiplexers.FirstOrDefault(m => initiatorMuxers.Contains(m.Id));
if (commonMuxer != null)
{
context.SpecificProtocolRequest = new ChannelRequest
Expand Down

0 comments on commit 475c0c3

Please sign in to comment.