Skip to content

Commit f27a723

Browse files
committed
Fix bug recording stops
1 parent 6dcce35 commit f27a723

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/mode/twitter/TwitterComment.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,18 @@ module.exports = (() => {
8181
'>': '>'
8282
};
8383

84-
var streamStartAt;
84+
var streamStartAt, streaming = false;
8585

8686
var setup = (() => {
87+
if (streaming) return;
88+
streaming = true;
8789
streamStartAt = Date.now();
8890
this._event.emit("stream");
8991
}).bind(this);
9092

9193
var destroy = (err => {
9294
this.destroyStream();
95+
streaming = false;
9396
this._event.emit("error", err);
9497
}).bind(this);
9598

0 commit comments

Comments
 (0)