We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1109132 commit 83775c3Copy full SHA for 83775c3
lib/log-stream.js
@@ -33,15 +33,18 @@ class LogStream extends Readable {
33
};
34
35
let next = (_err, _data) => {
36
+ this.pending = false;
37
setTimeout(this._read.bind(this), this.options.durationBetweenPolls);
38
39
- this.pending = false;
40
this.cloudwatchlogs.getLogEvents(params)
41
.then((data) => {
42
- if (data && data.events.length > 0) {
+ if (data) {
43
+ if (!this.logsReceived) {
44
+ this.logsReceived = data.events.length > 0
45
+ }
46
+
47
this.nextToken = data.nextForwardToken;
- this.logsReceived = true;
48
data.events.forEach((event) => this.eventBuffer.push(event));
49
}
50
0 commit comments