Merge pull request #27461 from cachedout/clean_context_ioloop

Only clean context if it exists
This commit is contained in:
Mike Place 2015-09-29 09:49:52 -06:00
commit e8f58a6a3f

View file

@ -312,7 +312,8 @@ class AsyncZeroMQPubChannel(salt.transport.mixins.auth.AESPubClientMixin, salt.t
# TODO: Optionally call stream.close() on newer pyzmq? Its broken on some
self._stream.io_loop.remove_handler(self._stream.socket)
self._stream.socket.close(0)
self.context.term()
if hasattr(self, 'context'):
self.context.term()
def __del__(self):
self.destroy()