Skip to content
This repository was archived by the owner on Jan 19, 2024. It is now read-only.

Commit ca0c7d9

Browse files
committed
fix(esSynchronise): using end event on stream, cause close may be emitted earlier than all docs will be passed to Bulker
1 parent a23cebf commit ca0c7d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ function synchronize(conditions, projection, options, callback) {
396396
}
397397
});
398398

399-
stream.on('close', () => {
399+
stream.on('end', () => {
400400
streamClosed = true;
401401
if (bulker.filled()) {
402402
bulker.flush();

0 commit comments

Comments
 (0)