Mute max listener warning

This commit is contained in:
garronej 2023-03-25 05:11:25 +01:00
parent 910bfe2318
commit a22b231982

View File

@ -7,6 +7,8 @@ export default function tee(input: Readable) {
let aFull = false;
let bFull = false;
a.setMaxListeners(Infinity);
a.on("drain", () => {
aFull = false;
if (!aFull && !bFull) input.resume();