diff options
author | beavailable <beavailable@proton.me> | 2023-02-01 19:03:59 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-01 16:33:59 +0530 |
commit | cc407b9de645ab7c137df8ea2409a005369169a5 (patch) | |
tree | c2df6b351a04a56153016e535f34f8f99b7a4724 /Lib/asyncio/streams.py | |
parent | 75227fba1dd1683289d90ada7abba237bff55d14 (diff) | |
download | cpython-cc407b9de645ab7c137df8ea2409a005369169a5.tar.gz cpython-cc407b9de645ab7c137df8ea2409a005369169a5.zip |
gh-101317: Add `ssl_shutdown_timeout` parameter for `asyncio.StreamWriter.start_tls` (#101335)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Diffstat (limited to 'Lib/asyncio/streams.py')
-rw-r--r-- | Lib/asyncio/streams.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/asyncio/streams.py b/Lib/asyncio/streams.py index 0f9098b4195..7d13e961bd2 100644 --- a/Lib/asyncio/streams.py +++ b/Lib/asyncio/streams.py @@ -378,7 +378,8 @@ class StreamWriter: async def start_tls(self, sslcontext, *, server_hostname=None, - ssl_handshake_timeout=None): + ssl_handshake_timeout=None, + ssl_shutdown_timeout=None): """Upgrade an existing stream-based connection to TLS.""" server_side = self._protocol._client_connected_cb is not None protocol = self._protocol @@ -386,7 +387,8 @@ class StreamWriter: new_transport = await self._loop.start_tls( # type: ignore self._transport, protocol, sslcontext, server_side=server_side, server_hostname=server_hostname, - ssl_handshake_timeout=ssl_handshake_timeout) + ssl_handshake_timeout=ssl_handshake_timeout, + ssl_shutdown_timeout=ssl_shutdown_timeout) self._transport = new_transport protocol._replace_writer(self) |