fix(announce): fixed announce issue

This commit is contained in:
OldHawk
2018-05-03 19:17:22 +08:00
parent e5bbb8cc23
commit 697e5408d9

View File

@@ -881,7 +881,7 @@ exports.announce = function (req, res) {
* @returns {boolean}
*/
function getCurrentPeer(callback) {
req.selfpeer.forEach(function (p) {
req.selfpeer.every(function (p) {
if (p.peer_id === query.peer_id) {
req.currentPeer = p;
req.currentPeer.isNewCreated = false;