Add sorting by protocol to get_peers function
-Small change to help sort the peers list a bit better when filtering ports so that lower protocols drop off the list if there are multiple connections from the same ip with different protocols
This commit is contained in:
+1
-1
@@ -1125,7 +1125,7 @@ module.exports = {
|
||||
},
|
||||
|
||||
get_peers: function(cb) {
|
||||
Peers.find().sort({address: 1, port: 1}).exec(function (err, peers) {
|
||||
Peers.find().sort({address: 1, protocol: -1, port: 1}).exec(function (err, peers) {
|
||||
if (err)
|
||||
return cb([]);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user