This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xdegaye
Recipients xdegaye
Date 2011-11-01.16:08:29
SpamBayes Score 1.7261748e-12
Marked as misclassified No
Message-id <1320163710.5.0.667995234807.issue13311@psf.upfronthosting.co.za>
In-reply-to
Content
When the remote end disconnects, handle_close is only called if recv
is called (from handle_read). The default implementation of
handle_read does not call recv.

Not having the default implementation of handle_read call recv, has
the following drawbacks:

    an implementation of a subclass of dispatcher that only sends
    data, a logger for example, may believe that it does not have to
    implement handle_read since it does not expect any data and since
    there is no hint in the code or in the documentation that it
    should

    test_handle_expt currently succeeds when it should fail since the
    current handling of out-of-band data is broken (see issue 13310),
    but if the default implementation of handle_read had called recv,
    then test_handle_expt would have failed, allowing to detect the
    problem

The attached patch adds a call to recv in handle_read, updates the
documentation and adds a test case.

Note that when this patch is applied, test_handle_expt fails
as expected, issue 13310 should be fixed first.
History
Date User Action Args
2011-11-01 16:08:30xdegayesetrecipients: + xdegaye
2011-11-01 16:08:30xdegayesetmessageid: <1320163710.5.0.667995234807.issue13311@psf.upfronthosting.co.za>
2011-11-01 16:08:29xdegayelinkissue13311 messages
2011-11-01 16:08:29xdegayecreate