diff --git a/srtcore/crypto.cpp b/srtcore/crypto.cpp index 3c09570a1..cbb8327c9 100644 --- a/srtcore/crypto.cpp +++ b/srtcore/crypto.cpp @@ -839,6 +839,7 @@ EncryptionStatus CCryptoControl::decrypt(ref_t r_packet SRT_ATR_UNUSED) CCryptoControl::~CCryptoControl() { #ifdef SRT_ENABLE_ENCRYPTION + close(); if (m_hSndCrypto) { HaiCrypt_Close(m_hSndCrypto);