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 berker.peksag
Recipients berker.peksag, docs@python, giampaolo.rodola, gvanrossum, pitrou, vstinner, xdegaye, yselivanov
Date 2016-06-08.11:01:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1465383666.7.0.470378890066.issue26437@psf.upfronthosting.co.za>
In-reply-to
Content
After changeset 3ec208c01418 this is no longer an issue:

>>> from asyncio import *
>>> loop = get_event_loop()
>>> coro = loop.create_server(Protocol(), '', '12345')
>>> loop.run_until_complete(coro)
<Server sockets=[<socket.socket fd=7, family=AddressFamily.AF_INET, type=2049, proto=6, laddr=('0.0.0.0', 
>>> coro = loop.create_server(Protocol(), '127.0.0.1', '12345')
>>> loop.run_until_complete(coro)
Traceback (most recent call last):
  File "/home/berker/projects/cpython/default/Lib/asyncio/base_events.py", line 981, in create_server
    sock.bind(sa)
OSError: [Errno 98] Address already in use

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/berker/projects/cpython/default/Lib/asyncio/base_events.py", line 404, in run_until_complete
    return future.result()
  File "/home/berker/projects/cpython/default/Lib/asyncio/futures.py", line 274, in result
    raise self._exception
  File "/home/berker/projects/cpython/default/Lib/asyncio/tasks.py", line 240, in _step
    result = coro.send(None)
  File "/home/berker/projects/cpython/default/Lib/asyncio/base_events.py", line 985, in create_server
    % (sa, err.strerror.lower()))
OSError: [Errno 98] error while attempting to bind on address ('127.0.0.1', 12345): address already in use

The traceback looks a bit noisy though. Perhaps it needs ``... from None`` or something like that.
History
Date User Action Args
2016-06-08 11:01:06berker.peksagsetrecipients: + berker.peksag, gvanrossum, pitrou, vstinner, giampaolo.rodola, docs@python, xdegaye, yselivanov
2016-06-08 11:01:06berker.peksagsetmessageid: <1465383666.7.0.470378890066.issue26437@psf.upfronthosting.co.za>
2016-06-08 11:01:06berker.peksaglinkissue26437 messages
2016-06-08 11:01:06berker.peksagcreate