我收到错误 警告:检测到可能的EventEmitter内存泄漏。 11添加了重新连接的侦听器。使用emitter.setMaxListeners()来增加限制。
app.get('/json',function(req,res){
var url_parts = url.parse(req.url, true);
var query = url_parts.query;
switch (query.n)
{
case "at":
where = {name: query.a};
type = {_id: 0, name: 1, damage: 1, type: 1, a_s_type: 1};
locs.db_find('a_type', where, type, function(err,resp){
if(!err){
where = {username_id: ich.id, active: "1", first: "1"};
type = {_id: 0, name: 1 };
locs.db_find('u_p', where, type, function(err,re){
if(!err){
where = {name : re[0]['name']};
type = {_id:0, type: 1, type_1: 1};
locs.db_find('pmn', where, type, function (err,rep){
if(!err){
rep = rep[0];
where = {username_id: ich.id};
type = {_id:0, sp: 1};
locs.db_find('pve',where,type,function(err,pve){
if(!err){
pve=pve[0];
// some other code
res.json({""other code results"});
}});
}});
}});
} })
break;
}
});