Skip to content

Commit 66aa1c1

Browse files
authored
Fix synchronous TLS-in-TLS streams (#840)
* Fix synchronous TLS-in-TLS * changelog
1 parent d664b32 commit 66aa1c1

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
77
## Unreleased
88

99
- Fix pool timeout to account for the total time spent retrying. (#823)
10+
- Fix synchronous TLS-in-TLS streams. (#840)
1011

1112
## 1.0.0 (October 6th, 2023)
1213

httpcore/_backends/sync.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,6 @@ def start_tls(
145145
server_hostname: typing.Optional[str] = None,
146146
timeout: typing.Optional[float] = None,
147147
) -> NetworkStream:
148-
if isinstance(self._sock, ssl.SSLSocket): # pragma: no cover
149-
raise RuntimeError(
150-
"Attempted to add a TLS layer on top of the existing "
151-
"TLS stream, which is not supported by httpcore package"
152-
)
153-
154148
exc_map: ExceptionMapping = {
155149
socket.timeout: ConnectTimeout,
156150
OSError: ConnectError,

0 commit comments

Comments
 (0)