Skip to content
This repository was archived by the owner on Nov 23, 2017. It is now read-only.
This repository was archived by the owner on Nov 23, 2017. It is now read-only.

StreamWriter.drain() coroutine can "short-circuit" #263

@jashandeep-sohi

Description

@jashandeep-sohi

When using the Streams API to make servers (i.e. using loop.start_server), the StreamWriter.drain() coroutine can short-circuit into an infinite loop and stop bubbling up any exceptions to the caller. This happens, for example, when a client disconnects early: http://stackoverflow.com/questions/32175217/how-to-detect-write-failure-in-asyncio/

A simple solution for the user is to just do an empty yield before every drain() call, but perhaps this fix should be moved upstream.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions