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