bef72d9
Branches > refactor/use-spec-1 > bef72d9 > files / src / net / bowmap / packet / server.clj
Send keepalive every 5 seconds instead of every 20 idk it was dcing
Commit: bef72d90b361f0cc8201618a44de06b2c823240c
Parent: 7a196ca
1 changed file:
src/net/bowmap/core.clj view file
@@ -36,10 +36,13 @@ [client packet-buf] (let [pk (sp/decode-packet packet-buf (::state/state client))] (when (= (::pk/id pk) ::sp/finish-config)- (s/connect (s/periodically 20000 0 (fn []- {::pk/id ::cp/keep-alive- :id (long (* (rand) Long/MAX_VALUE))}))- (::packet-stream client)))+ ; Because the return map is arbitrary, this can definitely be idk literally anywhere else lmao+ ; These 3 functions definitely need to change although I don't know what that looks like.+ (s/connect (s/periodically 5000 0 (fn []+ {::pk/id ::cp/keep-alive+ :id (long (* (rand) Long/MAX_VALUE))}))+ (::packet-stream client)+ {:downstream? false})) (handle/response client pk))) (defn handle-message