Change by Isaac Boukris :
--
keywords: +patch
nosy: +Isaac Boukris
nosy_count: 1.0 -> 2.0
pull_requests: +27397
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/11770
___
Python tracker
<https://bugs.p
New submission from Isaac Boukris :
When recv() return 0 we may still have data to send. Add a handler for this
case, which may happen with some protocols, notably http1.0 ver.
Also, do not call recv with a buffer size of zero to avoid ambiguous return
value (see recv man page
Isaac Boukris added the comment:
Fair enough. I'll sign the CLA meanwhile you consider it.
In my opinion it may still be useful in addressing issues in existing projects
written using asyncore (and maybe for python2 as well).
T
Isaac Boukris added the comment:
> It seems recv() returning b"" is an alias for "connection lost". E.g. in
> Twisted:
To my understanding, technically the connection is not fully closed, it is just
shut-down for reading but we can still perform write operations o
Isaac Boukris added the comment:
> But I want to raise the flag again: why we are adding new functionality to
> the *deprecated* module? It violates our on deprecation policy, isn't it?
I'm biased but I see this as more of a small and subtle fix for the current
logic that in
Isaac Boukris added the comment:
if not data:
# a closed connection is indicated by signaling
# a read condition, and having recv() return 0.
self.handle_close()
return b''
This above is the current code. Do you agr