Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasDorier committed Sep 2, 2014
1 parent db9fa99 commit e4182af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion NBitcoin.Tests/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class Program
{
public static void Main()
{
//new ProtocolTests().CanBuildChain();
new ProtocolTests().CanConnectMultipleTimeToServer();
}
}
}
4 changes: 2 additions & 2 deletions NBitcoin/Protocol/Node.cs
Original file line number Diff line number Diff line change
Expand Up @@ -729,15 +729,15 @@ public void Dispose()

public void PingPong(CancellationToken cancellation = default(CancellationToken))
{
using(var listener = CreateListener())
using(var listener = CreateListener().OfType<PongPayload>())
{
var ping = new PingPayload()
{
Nonce = RandomUtils.GetUInt64()
};
SendMessage(ping);

while(RecieveMessage<PongPayload>(cancellation).Nonce != ping.Nonce)
while(listener.ReceivePayload<PongPayload>(cancellation).Nonce != ping.Nonce)
{
}
}
Expand Down

0 comments on commit e4182af

Please sign in to comment.