50671f1
Branches > main > 50671f1 > files / src / net / bowmap
Fix dosync in client leave! function
Commit: 50671f1843e3144ca69731442b59f118539fd7bf
Parent: c2b86ae
1 changed file:
src/net/bowmap/network/client.clj 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!))))))