Skip to content

Commit

Permalink
Finalizer on SSLStream
Browse files Browse the repository at this point in the history
  • Loading branch information
quinnj committed Oct 16, 2024
1 parent 5447110 commit 74ce7df
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ssl.jl
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,9 @@ mutable struct SSLStream <: IO
bio_read::BIO = BIO(io; finalize=false)
bio_write::BIO = BIO(io; finalize=false)
ssl = SSL(ssl_context, bio_read, bio_write)
return new(ssl, ssl_context, bio_read, bio_write, io, ReentrantLock(), ReentrantLock(), Ref{Csize_t}(0), Ref{Csize_t}(0), Ref{UInt8}(0x00), Ref{Csize_t}(0), false)
x = new(ssl, ssl_context, bio_read, bio_write, io, ReentrantLock(), ReentrantLock(), Ref{Csize_t}(0), Ref{Csize_t}(0), Ref{UInt8}(0x00), Ref{Csize_t}(0), false)
finalizer(close, x)
return x
end
end

Expand Down

0 comments on commit 74ce7df

Please sign in to comment.