File tree Expand file tree Collapse file tree 2 files changed +3
-20
lines changed Expand file tree Collapse file tree 2 files changed +3
-20
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ Core and Builtins
13
13
Library
14
14
-------
15
15
16
+ - Issue #23576: Avoid stalling in SSL reads when EOF has been reached in the
17
+ SSL layer but the underlying connection hasn't been closed.
18
+
16
19
- Issue #23504: Added an __all__ to the types module.
17
20
18
21
- Issue #20204: Added the __module__ attribute to _tkinter classes.
Original file line number Diff line number Diff line change @@ -1717,26 +1717,6 @@ static PyObject *PySSL_SSLread(PySSLSocket *self, PyObject *args)
1717
1717
BIO_set_nbio (SSL_get_rbio (self -> ssl ), nonblocking );
1718
1718
BIO_set_nbio (SSL_get_wbio (self -> ssl ), nonblocking );
1719
1719
1720
- /* first check if there are bytes ready to be read */
1721
- PySSL_BEGIN_ALLOW_THREADS
1722
- count = SSL_pending (self -> ssl );
1723
- PySSL_END_ALLOW_THREADS
1724
-
1725
- if (!count ) {
1726
- sockstate = check_socket_and_wait_for_timeout (sock , 0 );
1727
- if (sockstate == SOCKET_HAS_TIMED_OUT ) {
1728
- PyErr_SetString (PySocketModule .timeout_error ,
1729
- "The read operation timed out" );
1730
- goto error ;
1731
- } else if (sockstate == SOCKET_TOO_LARGE_FOR_SELECT ) {
1732
- PyErr_SetString (PySSLErrorObject ,
1733
- "Underlying socket too large for select()." );
1734
- goto error ;
1735
- } else if (sockstate == SOCKET_HAS_BEEN_CLOSED ) {
1736
- count = 0 ;
1737
- goto done ;
1738
- }
1739
- }
1740
1720
do {
1741
1721
PySSL_BEGIN_ALLOW_THREADS
1742
1722
count = SSL_read (self -> ssl , mem , len );
You can’t perform that action at this time.
0 commit comments