ampy.py can not detect the socket closed when amp server is down.

Bug #1207618 reported by spikeekips
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ampy
New
Undecided
Unassigned

Bug Description

Hi, developers.

`ampy.py` does not check the socket is closed by the server-side like server is shutdown. When the server is shutdown, `sock.recv` in ampy.py still try to receive, but the data is 0 bytes. I attached my patch.

Thanks.

Revision history for this message
spikeekips (spikeekips) wrote :
Revision history for this message
Eric P. Mangold (teratorn) wrote :

Hi spikeekips,

Thank you for your patch! I intent to work on revamping Ampy in the near future to use asyncio instead of asyncore since asyncore is such a piece of junk by comparison. Possibly using a bundled version of https://pypi.python.org/pypi/trollius - the point of ampy is to be a chunk of python code you can grab and quickly have a pure-python + stdlib amp client and server.

Outside of those requirements you should just use Twisted implementation.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.