Update zmq context cleanup to use term.

Updates the RPC cleanup function for the zmq RPC driver
to use Context.term() instead of Context.destroy().

This allows the Nova code to work with older versions (pre 2.1.10)
of pyzmq. The Context term() function seems to do the job just as
well as destroy() (and is also thread safe) so lets just use it instead.

Fixes LP Bug #1044004.

Change-Id: I07a200d4b216c0c1e155b57588295b35a237576c
This commit is contained in:
Dan Prince
2012-08-30 15:08:25 -04:00
parent 23196734e4
commit af3f4b34ca

View File

@@ -677,7 +677,7 @@ def cleanup():
global ZMQ_CTX
global matchmaker
matchmaker = None
ZMQ_CTX.destroy()
ZMQ_CTX.term()
ZMQ_CTX = None