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

Timeout of threads of callbacks cause errors #12

Open
sotte opened this issue Jun 30, 2016 · 0 comments
Open

Timeout of threads of callbacks cause errors #12

sotte opened this issue Jun 30, 2016 · 0 comments

Comments

@sotte
Copy link
Contributor

sotte commented Jun 30, 2016

The error callback when joining a channel that one has no access to, i.e., :error is returned by phoenix, throws an error:

channel = socket.channel("project:no_access")
channel.join()\
    .receive("error", lambda _: sys.exit())

This is the error:

Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.4/threading.py", line 1184, in run
    self.finished.wait(self.interval)
  File "/usr/lib/python3.4/threading.py", line 553, in wait
    signaled = self._cond.wait(timeout)
  File "/usr/lib/python3.4/threading.py", line 293, in wait
    if timeout > 0:
TypeError: unorderable types: function() > int()

Whereas joining a channel successfully works:

channel.join()\
    .receive("ok", lambda: print("Successfully joined"))

I haven't had time to debug it. I'll just write it down and add more information later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant