50671f1

Branches > main > 50671f1 > files / src / net / bowmap

Fix dosync in client leave! function

Grahp, 2026-08-20

Commit: 50671f1843e3144ca69731442b59f118539fd7bf
Parent: c2b86ae

1 changed file:

src/net/bowmap/network/client.clj modified (view file)

@@ -13,12 +13,12 @@         ::connection/connection (connection/connection socket)}))  (defn leave! [client-ref]-  (let [{:keys! [::connection/connection] :keys [::playing? ::entity/uuid]} @client-ref]-    (try-      (dosync+  (dosync+    (let [{:keys! [::connection/connection] :keys [::playing? ::entity/uuid]} @client-ref]+      (try         (when playing?           ; What should really happen if this fails?           ; Probably should come up with a better solution-          (commute server/players dissoc uuid)))-      (finally-        (send connection connection/close!)))))+          (commute server/players dissoc uuid))+        (finally+          (send connection connection/close!))))))