🚧 Add debug output

This commit is contained in:
C-3PO 2018-07-08 22:04:01 +02:00
parent 09fb2eed85
commit 0a23394b56
Signed by: c3po
GPG key ID: 62993C4BB4D86F24

View file

@ -4,6 +4,7 @@ import * as stream from 'stream';
function waitReadableLength(inputStream: stream.Readable, minLength: number): Promise<void> { function waitReadableLength(inputStream: stream.Readable, minLength: number): Promise<void> {
return new Promise((resolve) => { return new Promise((resolve) => {
const interval = setInterval(() => { const interval = setInterval(() => {
console.log('waiting...', inputStream.readableLength, minLength);
if (inputStream.readableLength >= minLength) { if (inputStream.readableLength >= minLength) {
clearInterval(interval); clearInterval(interval);
resolve(); resolve();