             (swap! connection connect-server)
             (when-not @connection
               (error "Unable to reconnect to OLA server, shutting down ola_client")
-              (close! channel))))))
-    (info "OLA request processor terminating.")))
+              (shutdown))))))
+    (info "OLA request processor terminating.")
+    (shutdown)))
 
 (defn- create-channel
   [old-channel]

      (swap! connection disconnect-server))
))

(defn- process-requests
  "Set up loops to read requests on our local channel and send them to the OLA server, and read its responses
  and  dispatch them to the proper handlers. Needs to be called in a future since it uses blocking reads from

(defn send-request
  "Send a request to the OLA server."
  [name message response-type response-handler]
  (start)
  (>!! @channel [name message response-type response-handler]))

