cleanup
This commit is contained in:
parent
d22aecca7f
commit
0b5279fd33
@ -203,7 +203,6 @@ const setupWS = (provider) => {
|
|||||||
websocket.send(encoding.toUint8Array(encoderAwarenessState))
|
websocket.send(encoding.toUint8Array(encoderAwarenessState))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
provider.emit('status', [{
|
provider.emit('status', [{
|
||||||
status: 'connecting'
|
status: 'connecting'
|
||||||
}])
|
}])
|
||||||
@ -215,8 +214,9 @@ const setupWS = (provider) => {
|
|||||||
* @param {ArrayBuffer} buf
|
* @param {ArrayBuffer} buf
|
||||||
*/
|
*/
|
||||||
const broadcastMessage = (provider, buf) => {
|
const broadcastMessage = (provider, buf) => {
|
||||||
if (provider.wsconnected && provider.ws && provider.ws.readyState === provider.ws.OPEN) {
|
const ws = provider.ws
|
||||||
/** @type {WebSocket} */ (provider.ws).send(buf)
|
if (provider.wsconnected && ws && ws.readyState === ws.OPEN) {
|
||||||
|
ws.send(buf)
|
||||||
}
|
}
|
||||||
if (provider.bcconnected) {
|
if (provider.bcconnected) {
|
||||||
bc.publish(provider.bcChannel, buf, provider)
|
bc.publish(provider.bcChannel, buf, provider)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user