finally write close_notify correctly
parent
b02b8571a0
commit
2dfaf6a275
|
@ -138,20 +138,20 @@ function do_ssl_shutdown(client)
|
|||
@show status = ssl_status(client, n)
|
||||
end
|
||||
if status in (SSL_WANT_READ, SSL_WANT_WRITE)
|
||||
@info "READING"
|
||||
while true
|
||||
(n, buf) = bio_read(client)
|
||||
println("bio_read: $(n)")
|
||||
if n > 0
|
||||
queue_encrypted_bytes(client, buf)
|
||||
elseif !bio_should_retry(client.wbio)
|
||||
return -1
|
||||
else
|
||||
res = do_sock_write(client)
|
||||
# TODO: Check res?
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
@show ssl_status(client, shutdown(client))
|
||||
# println("End of ssl handshake")
|
||||
# Here, ssl_status(client, shutdown(client))
|
||||
# still want read .-.,,
|
||||
return status
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue