Browse Source

flow_control: slighly simpler logic

master
nixo 2 years ago
parent
commit
aad803ee04
  1. 9
      src/flow_control.jl

9
src/flow_control.jl

@ -15,8 +15,7 @@ function do_ssl_handshake(client)
queue_encrypted_bytes(client, buf)
elseif !bio_should_retry(client.wbio)
return -1
end
if n <= 0
else
break
end
end
@ -44,8 +43,9 @@ function do_encrypt(client)
queue_encrypted_bytes(client, buf)
elseif !bio_should_retry(client.wbio)
return -1
else
break
end
n > 0 || break
end
end
if status in (SSL_ERROR, SSL_SYSCALL)
@ -97,8 +97,9 @@ function on_read_cb(client, buffer)
queue_encrypted_bytes(client, buf)
elseif !bio_should_retry(client.wbio)
return -1
else
break
end
n < 0 && break
end
end
if status in (SSL_ERROR, SSL_SYSCALL)

Loading…
Cancel
Save