You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Chuck Rolke (JIRA)" <ji...@apache.org> on 2019/05/02 18:50:00 UTC
[jira] [Created] (PROTON-2039) Python listener.close does not close
socket
Chuck Rolke created PROTON-2039:
-----------------------------------
Summary: Python listener.close does not close socket
Key: PROTON-2039
URL: https://issues.apache.org/jira/browse/PROTON-2039
Project: Qpid Proton
Issue Type: Bug
Components: python-binding
Affects Versions: proton-c-0.27.1
Environment: Fedora 29, python 3.7.3
Fedora 28, python 2.7.15
Reporter: Chuck Rolke
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.
{code:java}
(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
{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org