Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
proton-c-0.27.1
-
None
-
Fedora 29, python 3.7.3
Fedora 28, python 2.7.15
Description
To demonstrate: execute python/examples/helloworld_direct.py two times within a few seconds. The first time works and the second time fails with an 'Address already in use' error.
The expectation is that this program can be run many times in quick succession.
(M=713c3 ?7) chug@unused examples> pwd /home/chug/git/qpid-proton/python/examples (M=713c3 ?7) chug@unused examples> ./helloworld_direct.py Hello World! (M=713c3 ?7) chug@unused examples> ./helloworld_direct.py Traceback (most recent call last): File "./helloworld_direct.py", line 48, in <module> Container(HelloWorld("localhost:8888/examples")).run() File "/opt/local/lib64/proton/bindings/python/proton/_reactor.py", line 181, in run while self.process(): pass File "/opt/local/lib64/proton/bindings/python/proton/_reactor.py", line 238, in process event.dispatch(handler) File "/opt/local/lib64/proton/bindings/python/proton/_events.py", line 138, in dispatch self.dispatch(h, type) File "/opt/local/lib64/proton/bindings/python/proton/_events.py", line 135, in dispatch _dispatch(handler, type.method, self) File "/opt/local/lib64/proton/bindings/python/proton/_events.py", line 115, in _dispatch m(*args) File "/opt/local/lib64/proton/bindings/python/proton/_handlers.py", line 476, in on_reactor_init self.on_start(event) File "./helloworld_direct.py", line 32, in on_start self.acceptor = event.container.listen(self.url) File "/opt/local/lib64/proton/bindings/python/proton/_reactor.py", line 1166, in listen acceptor = self.acceptor(url.host, url.port) File "/opt/local/lib64/proton/bindings/python/proton/_reactor.py", line 304, in acceptor a = Acceptor(self, unicode2utf8(host), int(port), impl) File "/opt/local/lib64/proton/bindings/python/proton/_reactor.py", line 678, in __init__ sock = IO.listen(host, port) File "/opt/local/lib64/proton/bindings/python/proton/_io.py", line 46, in listen s.bind((host, port)) OSError: [Errno 98] Address already in use 1 (M=713c3 ?7) chug@unused examples> ss -t -a -n | grep 8888 TIME-WAIT 0 0 127.0.0.1:8888 127.0.0.1:42648