File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -312,8 +312,12 @@ static inline int php_openssl_setup_crypto(php_stream *stream,
312
312
SSL_METHOD * method ;
313
313
314
314
if (sslsock -> ssl_handle ) {
315
- php_error_docref (NULL TSRMLS_CC , E_WARNING , "SSL/TLS already set-up for this stream" );
316
- return -1 ;
315
+ if (sslsock -> s .is_blocked ) {
316
+ php_error_docref (NULL TSRMLS_CC , E_WARNING , "SSL/TLS already set-up for this stream" );
317
+ return -1 ;
318
+ } else {
319
+ return 0 ;
320
+ }
317
321
}
318
322
319
323
/* need to do slightly different things, based on client/server method,
@@ -435,7 +439,8 @@ static inline int php_openssl_enable_crypto(php_stream *stream,
435
439
}
436
440
437
441
if (n <= 0 ) {
438
- retry = handle_ssl_error (stream , n , 1 TSRMLS_CC );
442
+ retry = handle_ssl_error (stream , n , sslsock -> is_client || sslsock -> s .is_blocked TSRMLS_CC );
443
+
439
444
} else {
440
445
break ;
441
446
}
You can’t perform that action at this time.
0 commit comments