<#918 Fix WantReadError in _bootstrap_ssl_from_ser...
# flyte-github
a
#918 Fix WantReadError in _bootstrap_ssl_from_server Pull request opened by jeevb Summary • Fix
WantReadError
/
WantWriteError
raised by pyOpenSSL's
do_handshake()
when
socket.create_connection()
leaves the fd in non-blocking mode (O_NONBLOCK set for any timeout > 0). Restore blocking mode with
sock.settimeout(None)
before the TLS handshake. • Improve resource cleanup: close the raw socket if
SSL.Connection()
fails before
conn
is assigned. • Add tests for empty cert chain, successful close, and socket cleanup on connection setup failure. • Assert that
settimeout(None)
is called on the socket, directly covering the core fix. Test plan •
pytest tests/flyte/remote/test_session.py::TestBootstrapSslFromServer
— all 5 tests pass • Manual verification against a Flyte cluster with
insecure_skip_verify=True
flyteorg/flyte-sdk