This commit is contained in:
jusax23 2023-10-06 14:41:37 +02:00
parent 229211689a
commit e4aba422a5
Signed by: jusax23
GPG key ID: 499E2AA870C1CD41

View file

@ -42,7 +42,9 @@ function ws_open_js(url, id) {
conn.state = WS_CONNECTED; conn.state = WS_CONNECTED;
}; };
conn.socket.onmessage = (e) => { conn.socket.onmessage = (e) => {
conn.received.push(new Uint8Array(e.data.arrayBuffer())); e.data.arrayBuffer().then((d) => {
conn.received.push(new Uint8Array(d));
});
}; };
conn.socket.onerror = (s, e) => { conn.socket.onerror = (s, e) => {
conn.state = WS_DISCONNECTED; conn.state = WS_DISCONNECTED;