summaryrefslogtreecommitdiff
path: root/main/tcptls.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/tcptls.c')
-rw-r--r--main/tcptls.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main/tcptls.c b/main/tcptls.c
index 92fee604d..1b0c26ad2 100644
--- a/main/tcptls.c
+++ b/main/tcptls.c
@@ -400,7 +400,11 @@ static int tcptls_stream_close(void *cookie)
if (!stream->ssl->server) {
/* For client threads, ensure that the error stack is cleared */
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+ ERR_remove_thread_state(NULL);
+#else
ERR_remove_state(0);
+#endif /* OPENSSL_VERSION_NUMBER >= 0x10000000L */
}
SSL_free(stream->ssl);