mirror of
https://github.com/penpot/penpot.git
synced 2025-05-16 01:06:38 +02:00
🐛 Fix unexpected exception on websocket handler.
This commit is contained in:
parent
590b68aa29
commit
2f589a49e9
1 changed files with 3 additions and 2 deletions
|
@ -17,6 +17,7 @@
|
||||||
[uxbox.util.uuid :as uuid]
|
[uxbox.util.uuid :as uuid]
|
||||||
[uxbox.util.transit :as t]
|
[uxbox.util.transit :as t]
|
||||||
[uxbox.util.blob :as blob]
|
[uxbox.util.blob :as blob]
|
||||||
|
[vertx.core :as vc]
|
||||||
[vertx.http :as vh]
|
[vertx.http :as vh]
|
||||||
[vertx.web :as vw]
|
[vertx.web :as vw]
|
||||||
[vertx.util :as vu]
|
[vertx.util :as vu]
|
||||||
|
@ -87,12 +88,12 @@
|
||||||
(defn handler
|
(defn handler
|
||||||
[{:keys [user] :as req}]
|
[{:keys [user] :as req}]
|
||||||
(letfn [(on-init [ws]
|
(letfn [(on-init [ws]
|
||||||
(let [vsm (::vw/execution-context req)
|
(let [ctx (vc/current-context)
|
||||||
fid (get-in req [:path-params :file-id])
|
fid (get-in req [:path-params :file-id])
|
||||||
ws (assoc ws
|
ws (assoc ws
|
||||||
:user-id user
|
:user-id user
|
||||||
:file-id fid)
|
:file-id fid)
|
||||||
sem (start-eventbus-consumer! vsm ws fid)]
|
sem (start-eventbus-consumer! ctx ws fid)]
|
||||||
(handle-message ws {:type :connect})
|
(handle-message ws {:type :connect})
|
||||||
(assoc ws ::sem sem)))
|
(assoc ws ::sem sem)))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue