mirror of
https://github.com/brunoos/luasec.git
synced 2024-12-27 04:58:20 +01:00
Merge pull request #172 from edzius/master
Handle SSL_send SYSCALL error without errno https://www.openssl.org/docs/man1.1.1/man3/SSL_get_error.html
This commit is contained in:
commit
359151144b
@ -182,6 +182,10 @@ static int ssl_send(void *ctx, const char *data, size_t count, size_t *sent,
|
||||
ssl->error = SSL_ERROR_SSL;
|
||||
return LSEC_IO_SSL;
|
||||
}
|
||||
/* Return failure when SSL reports syscall error
|
||||
* but errno is not set to break send operation. */
|
||||
if (errno == 0)
|
||||
return LSEC_IO_SSL;
|
||||
if (err == 0)
|
||||
return IO_CLOSED;
|
||||
return lsec_socket_error();
|
||||
|
Loading…
Reference in New Issue
Block a user