Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eb.close() hangs for about 1 minute #13

Open
gaol opened this issue Feb 7, 2020 · 1 comment
Open

eb.close() hangs for about 1 minute #13

gaol opened this issue Feb 7, 2020 · 1 comment
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@gaol
Copy link

gaol commented Feb 7, 2020

Reproduce Steps

  • Server Side

cd java
mvn clean install -DcreateAssembly=true
java -jar target/python-eventbus-example-3.8.5-jar-with-dependencies.jar -p 7000

  • Client side

In Python 3.7 console:

pip install -i https://test.pypi.org/simple/ vertx-eventbus-python==3.8.5a8

>>> from Vertx.eventbus import Eventbus
>>> eb = Eventbus()
>>> eb.state
<State.OPEN: 1>
>>> body={'msg':'hi'}
>>> eb.send('echo',body)
>>> eb.close()   ## HERE it hangs about 1 minute
>>> eb.state
<State.CLOSED: 3>
>>> eb.open()    ## HERE eb.open() failed, may needs a new sokcet?
Traceback (most recent call last):
  File "/home/lgao/anaconda3/lib/python3.7/site-packages/Vertx/eventbus.py", line 226, in open
    self._connect()
  File "/home/lgao/anaconda3/lib/python3.7/site-packages/Vertx/eventbus.py", line 238, in _connect
    self.sock.connect((self.host, self.port))
OSError: [Errno 9] Bad file descriptor

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/lgao/anaconda3/lib/python3.7/site-packages/Vertx/eventbus.py", line 230, in open
    self.close()
  File "/home/lgao/anaconda3/lib/python3.7/site-packages/Vertx/eventbus.py", line 406, in close
    self.wait(State.CLOSED,timeOut=self.timeOut)
  File "/home/lgao/anaconda3/lib/python3.7/site-packages/Vertx/eventbus.py", line 258, in wait
    raise Exception("wait for %s timedOut after %.3f secs" % (state.name,timeOut))
Exception: wait for CLOSED timedOut after 60.000 secs

The eb.close() hangs for about 1 minute, and eb.open() afterwards throws above exception.

@WolfgangFahl
Copy link
Member

WolfgangFahl commented Feb 7, 2020

@gaol thank you for reporting his
I'll have to try this out and get back to you

@WolfgangFahl WolfgangFahl self-assigned this Feb 7, 2020
@WolfgangFahl WolfgangFahl added the question Further information is requested label Feb 7, 2020
@WolfgangFahl WolfgangFahl reopened this Feb 7, 2020
@WolfgangFahl WolfgangFahl added the bug Something isn't working label Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants