File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 143
143
#include < algorithm>
144
144
145
145
#include < assert.h>
146
+ #include < errno.h>
146
147
#include < limits.h>
147
148
#include < stdlib.h>
148
149
#include < string.h>
@@ -1375,8 +1376,11 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
1375
1376
}
1376
1377
// An EOF was observed which violates the protocol, and the underlying
1377
1378
// transport does not participate in the error queue. Bubble up to the
1378
- // caller.
1379
- return SSL_ERROR_SYSCALL;
1379
+ // caller. If errno is non-zero due to temporariy unavailability (e.g.
1380
+ // non-blocking socket), continue with normal logic.
1381
+ if (errno != 0 && errno != EAGAIN && errno != EWOULDBLOCK) {
1382
+ return SSL_ERROR_SYSCALL;
1383
+ }
1380
1384
}
1381
1385
1382
1386
switch (ssl->s3 ->rwstate ) {
You can’t perform that action at this time.
0 commit comments