Thanks to visit codestin.com
Credit goes to github.com

Skip to content

asyncio.StreamWriter.start_tls() does not update the linked StreamReader transport #152431

Description

@kn1g78

Bug report

Bug description:

After StreamWriter.start_tls() upgrades a stream to TLS, the StreamWriter
and StreamReaderProtocol are updated to use the new transport, but the linked
StreamReader still keeps the old transport.

The relevant code path is in StreamReaderProtocol._replace_transport()
(Lib/asyncio/streams.py:216). The linked StreamReader transport can be
updated in the same path (Lib/asyncio/streams.py:481).

StreamWriter, StreamReaderProtocol, and StreamReader should all refer to
the upgraded transport after start_tls().

CPython versions tested on:

3.16

Operating systems tested on:

Windows

Linked PRs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytopic-asynciotype-bugAn unexpected behavior, bug, or error

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions