Skip to content

Commit

Permalink
Fix synchronous TLS-in-TLS streams (#840)
Browse files Browse the repository at this point in the history
* Fix synchronous TLS-in-TLS

* changelog
  • Loading branch information
karpetrosyan authored Nov 2, 2023
1 parent d664b32 commit 66aa1c1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## Unreleased

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

## 1.0.0 (October 6th, 2023)

Expand Down
6 changes: 0 additions & 6 deletions httpcore/_backends/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,6 @@ def start_tls(
server_hostname: typing.Optional[str] = None,
timeout: typing.Optional[float] = None,
) -> NetworkStream:
if isinstance(self._sock, ssl.SSLSocket): # pragma: no cover
raise RuntimeError(
"Attempted to add a TLS layer on top of the existing "
"TLS stream, which is not supported by httpcore package"
)

exc_map: ExceptionMapping = {
socket.timeout: ConnectTimeout,
OSError: ConnectError,
Expand Down

0 comments on commit 66aa1c1

Please sign in to comment.