WebSocket stabiler gemacht mit Puffern beim Broker
This commit is contained in:
1 parent
12523ddd0a
commit
c793e8b16d
10 files changed
+533
-37
No files matched your search
@@ -2701,7 +2701,13 @@ async function connectWebSocket() {
|
||||
dispatcherState.ws = ws;
|
||||
|
||||
ws.addEventListener('open', () => {
|
||||
ws.send(JSON.stringify({code: 0, msg: token}));
|
||||
ws.send(JSON.stringify({
|
||||
code: 0,
|
||||
msg: {
|
||||
token,
|
||||
session_id: window.CMBNET_CLIENT_SESSION_ID || ''
|
||||
}
|
||||
}));
|
||||
dispatcherState.authenticated = true;
|
||||
setConnectionStatus('Verbunden', 'connected');
|
||||
dispatcherState.lastCode0ReceivedAt = Date.now();
|
||||
|
||||
@@ -1105,7 +1105,13 @@ function connectWebSocket() {
|
||||
const ws = new WebSocket(wsUrl);
|
||||
state.ws = ws;
|
||||
ws.addEventListener('open', () => {
|
||||
ws.send(JSON.stringify({code: 0, msg: token}));
|
||||
ws.send(JSON.stringify({
|
||||
code: 0,
|
||||
msg: {
|
||||
token,
|
||||
session_id: window.CMBNET_CLIENT_SESSION_ID || ''
|
||||
}
|
||||
}));
|
||||
state.authenticated = true;
|
||||
});
|
||||
ws.addEventListener('message', handleWs);
|
||||
|
||||
Reference in new issue
Block a user