Skip to content

Commit

Permalink
increase ws buffers
Browse files Browse the repository at this point in the history
Inspect with grove devtools gets rather chatty and causing random
disconnects when too many messages pile up due to one big message
delaying processing. can't make client read faster, so just
buffer more.
  • Loading branch information
thheller committed May 20, 2024
1 parent b0fc7ee commit f7de4ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/shadow/cljs/devtools/server/web/api.clj
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@

;; relay can be very chatty, try to not drop too many messages
;; while also not buffering too much
(let [ws-in (async/chan 256 (map transit-read))
ws-out (async/chan 256 (map transit-str))]
(let [ws-in (async/chan 4096 (map transit-read))
ws-out (async/chan 4096 (map transit-str))]
{:ws-in ws-in
:ws-out ws-out
:ws-loop (relay/connect relay ws-in ws-out {:remote true :websocket true})}))))

0 comments on commit f7de4ef

Please sign in to comment.