File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -35,15 +35,14 @@ bio_clear_flags(bio::BIO) = bio_set_flags(bio, 0x00)
3535function on_bio_stream_read (bio:: BIO , out:: Ptr{Cchar} , outlen:: Cint )
3636 try
3737 bio_clear_flags (bio)
38- io = bio_get_data (bio)
38+ io = bio_get_data (bio):: TCPSocket
3939 n = bytesavailable (io)
4040 if n == 0
4141 bio_set_read_retry (bio)
4242 return Cint (0 )
4343 end
44- outlen = min (outlen, n)
45- unsafe_read (io, out, outlen)
46- return Cint (outlen)
44+ unsafe_read (io, out, min (UInt (n), outlen))
45+ return Cint (min (n, outlen))
4746 catch e
4847 # we don't want to throw a Julia exception from a C callback
4948 return Cint (0 )
@@ -639,7 +638,7 @@ function Base.close(ssl::SSLStream, shutdown::Bool=true)
639638 end
640639 finalize (ssl. ssl)
641640 end
642- return
641+ return
643642end
644643
645644"""
You can’t perform that action at this time.
0 commit comments