From d14df59d393cd454effa99e3661b5ae2c2f35f3b Mon Sep 17 00:00:00 2001 From: Chord Date: Wed, 1 Mar 2017 19:38:47 -0500 Subject: [PATCH] Fix for test leaking a DH crypto object Error was: net.psforever.crypto.CryptoInterface.CryptoDHState: class not closed. memory leaked --- common/src/test/scala/CryptoInterfaceTest.scala | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/common/src/test/scala/CryptoInterfaceTest.scala b/common/src/test/scala/CryptoInterfaceTest.scala index 7b75ea055..2bca544a6 100644 --- a/common/src/test/scala/CryptoInterfaceTest.scala +++ b/common/src/test/scala/CryptoInterfaceTest.scala @@ -109,14 +109,12 @@ class CryptoInterfaceTest extends Specification { args(stopOnFail = true) "safely handle multiple starts" in { val dontCare = ByteVector.fill(16)(0x42) - var dh = new CryptoDHState() + val dh = new CryptoDHState() dh.start() dh.start() must throwA[IllegalStateException] dh.close - dh = new CryptoDHState() - ok }