From cd8a907a869063572754bc4a4a13fe7ce941704d Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 5 Feb 2020 23:45:38 +0100 Subject: [PATCH] :sparkles: Adapt websockets code to the vertx module changes. --- backend/src/uxbox/http/ws.clj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/src/uxbox/http/ws.clj b/backend/src/uxbox/http/ws.clj index 76dd43cb3..25ffd1767 100644 --- a/backend/src/uxbox/http/ws.clj +++ b/backend/src/uxbox/http/ws.clj @@ -17,9 +17,9 @@ [uxbox.util.uuid :as uuid] [uxbox.util.transit :as t] [uxbox.util.blob :as blob] - [vertx.core :as vc] [vertx.http :as vh] [vertx.web :as vw] + [vertx.impl :as vi] [vertx.util :as vu] [vertx.eventbus :as ve]) (:import @@ -88,7 +88,7 @@ (defn handler [{:keys [user] :as req}] (letfn [(on-init [ws] - (let [ctx (vc/current-context) + (let [ctx (vu/current-context) fid (get-in req [:path-params :file-id]) ws (assoc ws :user-id user @@ -128,14 +128,14 @@ (-> (p/do! (on-init @local)) (p/then (fn [data] (vreset! local data) - (.textMessageHandler ws (vu/fn->handler + (.textMessageHandler ws (vi/fn->handler (fn [msg] (-> (p/do! (on-message @local msg)) (p/then (fn [data] (when (instance? WebSocket data) (vreset! local data)) (.fetch ws 1))))))) - (.closeHandler ws (vu/fn->handler (fn [& args] (on-close @local)))))))))) + (.closeHandler ws (vi/fn->handler (fn [& args] (on-close @local)))))))))) (defn ws-websocket []