From: Matthew Endsley Date: Wed, 3 Feb 2021 11:18:56 +0000 (-0800) Subject: Modify ConnectLikeAJerk to cap valid connections at 1 X-Git-Tag: 1.0.0~20^2~7^2~1 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=6084908496f581cfcb2844020044bc9c5e5bb1a4;p=rhonda%2Fimpostor.hazel.git Modify ConnectLikeAJerk to cap valid connections at 1 DTLS listeners will reject all raw traffic spam --- diff --git a/Hazel.UnitTests/ThreadLimitedUdpConnectionTests.cs b/Hazel.UnitTests/ThreadLimitedUdpConnectionTests.cs index 56a2748..8381044 100644 --- a/Hazel.UnitTests/ThreadLimitedUdpConnectionTests.cs +++ b/Hazel.UnitTests/ThreadLimitedUdpConnectionTests.cs @@ -222,7 +222,7 @@ namespace Hazel.UnitTests Thread.Sleep(500); Assert.AreEqual(0, listener.ReceiveQueueLength); - Assert.AreEqual(1, connects); + Assert.IsTrue(connects <= 1, $"Too many connections: {connects}"); } }