Skip to content

Commit 2696b5a

Browse files
author
Stephen von Takach
committed
OpenSSL locking functions cause a deadlock
This is probably because of FFI callbacks being handled in a thread pool? Not sure, however I don’t think I can rely on the Thread ID remaining constant…
1 parent 5ac9121 commit 2696b5a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/ruby-tls/ssl.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -225,12 +225,12 @@ def self.SSL_CTX_sess_set_cache_size(ssl_ctx, op)
225225

226226

227227
# Setup multi-threaded support
228-
SSL_LOCKS = []
229-
num_locks = self.CRYPTO_num_locks
230-
num_locks.times { SSL_LOCKS << Mutex.new }
228+
#SSL_LOCKS = []
229+
#num_locks = self.CRYPTO_num_locks
230+
#num_locks.times { SSL_LOCKS << Mutex.new }
231231

232-
self.CRYPTO_set_locking_callback(LockingCB)
233-
self.CRYPTO_set_id_callback(ThreadIdCB)
232+
#self.CRYPTO_set_locking_callback(LockingCB)
233+
#self.CRYPTO_set_id_callback(ThreadIdCB)
234234

235235

236236
bio = self.BIO_new_mem_buf(PrivateMaterials, PrivateMaterials.bytesize)

0 commit comments

Comments
 (0)