Only close existing ZMQ context's. Fixes #8635.
Merge pull request #8700 from s0undt3ch/issues/8653-logstash

Only close existing ZMQ context's. Fixes #8653.