We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b4b5638 commit 93a7008Copy full SHA for 93a7008
src/json-rpc/upstream/server.ts
@@ -79,6 +79,7 @@ export function createUpstreamServer({
79
80
logger.info`[${url}] connecting...`;
81
const ws = new WebSocket(url);
82
+ ws.binaryType = "arraybuffer";
83
84
ws.onopen = () => {
85
logger.info`[${url}] connected ok`;
@@ -87,7 +88,9 @@ export function createUpstreamServer({
87
88
connection$.next(ws);
89
};
90
- ws.onmessage = ({ data }) => handleMessage(data.toString());
91
+ ws.onmessage = ({ data }) => {
92
+ queueMicrotask(() => handleMessage(data.toString()));
93
+ };
94
95
ws.onclose = (event) => {
96
connection$.next(null);
0 commit comments