mirror of
https://github.com/penpot/penpot.git
synced 2025-03-12 07:41:43 -05: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.transit :as t]
|
||||
[uxbox.util.blob :as blob]
|
||||
[vertx.core :as vc]
|
||||
[vertx.http :as vh]
|
||||
[vertx.web :as vw]
|
||||
[vertx.util :as vu]
|
||||
|
@ -87,12 +88,12 @@
|
|||
(defn handler
|
||||
[{:keys [user] :as req}]
|
||||
(letfn [(on-init [ws]
|
||||
(let [vsm (::vw/execution-context req)
|
||||
(let [ctx (vc/current-context)
|
||||
fid (get-in req [:path-params :file-id])
|
||||
ws (assoc ws
|
||||
:user-id user
|
||||
:file-id fid)
|
||||
sem (start-eventbus-consumer! vsm ws fid)]
|
||||
sem (start-eventbus-consumer! ctx ws fid)]
|
||||
(handle-message ws {:type :connect})
|
||||
(assoc ws ::sem sem)))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue