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 143143#include < algorithm>
144144
145145#include < assert.h>
146+ #include < errno.h>
146147#include < limits.h>
147148#include < stdlib.h>
148149#include < string.h>
@@ -1375,8 +1376,11 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
13751376 }
13761377 // An EOF was observed which violates the protocol, and the underlying
13771378 // 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+ }
13801384 }
13811385
13821386 switch (ssl->s3 ->rwstate ) {
You can’t perform that action at this time.
0 commit comments