Skip to content

Commit 7fc22b9

Browse files
author
Cihad Tekin
committed
[push] bug: ObjectId and string match condition in connection pool grow
1 parent 04027a8 commit 7fc22b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/push/api/send/pool.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ class Pool extends Duplex {
290290
let unsent = this.state.messages().filter(m => mids.indexOf(m._id.toString()) === -1);
291291
if (unsent.length) {
292292
this.log.i('Sending unsent messages to %s: %j', connection.worker.threadId, unsent);
293-
connection.write(encode(FRAME.CONNECT, unsent.map(id => this.state.messages().filter(m => m._id.toString() === id)[0])));
293+
connection.write(encode(FRAME.CONNECT, unsent.map(_m => this.state.messages().filter(m => m._id.toString() === _m._id.toString())[0])));
294294
}
295295
return connection;
296296
}

0 commit comments

Comments
 (0)