mirror of
https://github.com/status-im/status-react.git
synced 2025-01-11 11:34:45 +00:00
Fix id->message-id
This commit is contained in:
parent
24d0b68c1f
commit
2f6742cdc7
@ -24,16 +24,16 @@
|
||||
mature-ch (async/chan)
|
||||
seen (atom #{})]
|
||||
(async/go-loop []
|
||||
(let [{:keys [id clock-value] :as msg} (async/<! in-ch)]
|
||||
(swap! seen conj [clock-value id])
|
||||
(let [{:keys [message-id clock-value] :as msg} (async/<! in-ch)]
|
||||
(swap! seen conj [clock-value message-id])
|
||||
(async/<! (async/timeout delay-ms))
|
||||
(async/put! mature-ch msg))
|
||||
(recur))
|
||||
(async/go-loop []
|
||||
(let [{:keys [id clock-value] :as msg} (async/<! mature-ch)]
|
||||
(let [{:keys [message-id clock-value] :as msg} (async/<! mature-ch)]
|
||||
(if reorder?
|
||||
(if (earliest-clock-value-seen? @seen id clock-value)
|
||||
(do (swap! seen disj [clock-value id])
|
||||
(if (earliest-clock-value-seen? @seen message-id clock-value)
|
||||
(do (swap! seen disj [clock-value message-id])
|
||||
(add-fn msg))
|
||||
(async/put! mature-ch msg))
|
||||
(add-fn msg)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user