mirror of
https://github.com/nasa/openmct.git
synced 2024-12-18 20:57:53 +00:00
fix: revert BatchingWebSocket changes
This commit is contained in:
parent
c0f2d95fa7
commit
b597b7530e
@ -19,7 +19,7 @@
|
||||
* this source code distribution or the Licensing information page available
|
||||
* at runtime from the About dialog for additional information.
|
||||
*****************************************************************************/
|
||||
|
||||
import installWorker from './WebSocketWorker.js';
|
||||
/**
|
||||
* Describes the strategy to be used when batching WebSocket messages
|
||||
*
|
||||
@ -69,7 +69,10 @@ class BatchingWebSocket extends EventTarget {
|
||||
constructor(openmct) {
|
||||
super();
|
||||
// Install worker, register listeners etc.
|
||||
this.#worker = new Worker(new URL('./WebSocketWorker.js', import.meta.url));
|
||||
const workerFunction = `(${installWorker.toString()})()`;
|
||||
const workerBlob = new Blob([workerFunction]);
|
||||
const workerUrl = URL.createObjectURL(workerBlob, { type: 'application/javascript' });
|
||||
this.#worker = new Worker(workerUrl);
|
||||
this.#openmct = openmct;
|
||||
this.#showingRateLimitNotification = false;
|
||||
this.#maxBatchSize = Number.POSITIVE_INFINITY;
|
||||
@ -83,6 +86,7 @@ class BatchingWebSocket extends EventTarget {
|
||||
'destroy',
|
||||
() => {
|
||||
this.disconnect();
|
||||
URL.revokeObjectURL(workerUrl);
|
||||
},
|
||||
{ once: true }
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user