flow_control: slighly simpler logic
parent
0c68821bbc
commit
aad803ee04
|
@ -15,8 +15,7 @@ function do_ssl_handshake(client)
|
||||||
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
|
||||||
end
|
else
|
||||||
if n <= 0
|
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -44,8 +43,9 @@ function do_encrypt(client)
|
||||||
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
|
||||||
|
break
|
||||||
end
|
end
|
||||||
n > 0 || break
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if status in (SSL_ERROR, SSL_SYSCALL)
|
if status in (SSL_ERROR, SSL_SYSCALL)
|
||||||
|
@ -97,8 +97,9 @@ function on_read_cb(client, buffer)
|
||||||
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
|
||||||
|
break
|
||||||
end
|
end
|
||||||
n < 0 && break
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if status in (SSL_ERROR, SSL_SYSCALL)
|
if status in (SSL_ERROR, SSL_SYSCALL)
|
||||||
|
|
Loading…
Reference in New Issue