For dynamic connections it is crucial to close connection
and not to have hanging sockets either we have sent message
successfully or not.
eventlet.green.zmq by default blocks the calling thread on sending message
when connection was not established yet (which is correct DEALER
socket behavior though), but socket cannot be closed when we hang on
sending forever (if we never get the valid host to connect).
eventlet also shields EAGAIN exception in default (blocking) sending mode
so we need to use async zmq.NOBLOCK flag to receive this exception
and hanlde it in our own way to not block forever.
Reviewed: https:/ /review. openstack. org/429639 /git.openstack. org/cgit/ openstack/ oslo.messaging/ commit/ ?id=4a1679450d7 2b784272a720101 5a5b331cdc09aa
Committed: https:/
Submitter: Jenkins
Branch: master
commit 4a1679450d72b78 4272a7201015a5b 331cdc09aa
Author: ozamiatin <email address hidden>
Date: Mon Feb 6 12:45:26 2017 +0200
[zmq] Dynamic connections send failure
For dynamic connections it is crucial to close connection
and not to have hanging sockets either we have sent message
successfully or not.
eventlet. green.zmq by default blocks the calling thread on sending message
when connection was not established yet (which is correct DEALER
socket behavior though), but socket cannot be closed when we hang on
sending forever (if we never get the valid host to connect).
eventlet also shields EAGAIN exception in default (blocking) sending mode
so we need to use async zmq.NOBLOCK flag to receive this exception
and hanlde it in our own way to not block forever.
Change-Id: Ib561e061c4b206 44213c059a8e8d0 efd225edea1
Closes-Bug: #1658913
Closes-Bug: #1663459