Browse Source

finally write close_notify correctly

master
Nicolò Balzarotti 2 years ago
parent
commit
2dfaf6a275
  1. 8
      src/flow_control.jl

8
src/flow_control.jl

@ -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…
Cancel
Save