mirror of
https://github.com/brunoos/luasec.git
synced 2024-11-07 22:18:27 +01:00
Return the number of data read and remove a useless line.
This commit is contained in:
parent
9efa963e35
commit
4101af103e
@ -200,10 +200,9 @@ static int ssl_recv(void *ctx, char *data, size_t count, size_t *got,
|
||||
ssl->error = SSL_get_error(ssl->ssl, err);
|
||||
switch (ssl->error) {
|
||||
case SSL_ERROR_NONE:
|
||||
*got = 0;
|
||||
*got = err;
|
||||
return IO_DONE;
|
||||
case SSL_ERROR_ZERO_RETURN:
|
||||
*got = 0;
|
||||
return IO_CLOSED;
|
||||
case SSL_ERROR_WANT_READ:
|
||||
err = socket_waitfd(&ssl->sock, WAITFD_R, tm);
|
||||
|
Loading…
Reference in New Issue
Block a user