opcjs-base 0.1.16-alpha → 0.1.17-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +12 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -16833,6 +16833,18 @@ var WebSocketReadableStream = class extends ReadableStream {
|
|
|
16833
16833
|
return new Promise((resolve) => {
|
|
16834
16834
|
this.notifyPull = () => {
|
|
16835
16835
|
this.notifyPull = null;
|
|
16836
|
+
if (this.errored) {
|
|
16837
|
+
controller.error(this.errored);
|
|
16838
|
+
this.cleanup();
|
|
16839
|
+
} else {
|
|
16840
|
+
const chunk = this.buffer.shift();
|
|
16841
|
+
if (chunk !== void 0) {
|
|
16842
|
+
controller.enqueue(chunk);
|
|
16843
|
+
} else if (this.closed) {
|
|
16844
|
+
controller.close();
|
|
16845
|
+
this.cleanup();
|
|
16846
|
+
}
|
|
16847
|
+
}
|
|
16836
16848
|
resolve();
|
|
16837
16849
|
};
|
|
16838
16850
|
});
|