flow_control: slighly simpler logic

master
nixo 2020-10-28 22:28:28 +01:00
parent 0c68821bbc
commit aad803ee04
1 changed files with 5 additions and 4 deletions

View File

@ -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)