[bug] avoid the events server to block twistd daemon
authorKali Kaneko <kali@leap.se>
Mon, 22 Feb 2016 23:26:45 +0000 (19:26 -0400)
committerKali Kaneko <kali@leap.se>
Tue, 23 Feb 2016 23:32:20 +0000 (19:32 -0400)
commitb940cfc29b88374ce57b101a39bc012bb903f6e8
treece4e6ee7a1715e875392242ddeb9b6b6182e0fea
parent88941164243ce1ac6f30c790120165c04ea4a041
[bug] avoid the events server to block twistd daemon

1. refactor the zmq_connect/bind methods to use the txzmq addEndpoints
mechanism, which cleans up the code a bit. it uses the underlying
bindOrConnect method.

2. wrap the addEndpoints call in a helper function that ensures that
doRead is called afterward.

I'm not fully comfortable with us still using the AuthenticatorThread, I
believe we could go witha txzmq-based authenticator for curve.
src/leap/common/events/server.py
src/leap/common/events/txclient.py
src/leap/common/events/zmq_components.py