From 7239f5a5b86846055a0d212a95271ab44faa2f81 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Mon, 6 Apr 2020 00:37:52 +0200 Subject: [PATCH] Clean ZMQ termination --- ocaml/TaskServer.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ocaml/TaskServer.ml b/ocaml/TaskServer.ml index 6f2d01f7..92a6f5ca 100644 --- a/ocaml/TaskServer.ml +++ b/ocaml/TaskServer.ml @@ -885,7 +885,9 @@ let run ~port = Zmq.Socket.send pair_socket @@ string_of_pub_state Stopped; Thread.join pub_thread; - Zmq.Socket.close rep_socket + Zmq.Socket.close pair_socket; + Zmq.Socket.close rep_socket; + Zmq.Context.terminate zmq_context