删除实例的时候在控制台里看到 Could not remove localhost:6379:1 from default connections. ,然后在 /usr/lib/node_modules/redis-commander/lib/routes/home.js 找到了对应的源代码:
12345678910111213141516171819
functionremoveConnectionFromDefaults(connections,connectionIds,callback){varnotRemoved=true;varhostname=connectionIds[0];varport=connectionIds[1];vardb=connectionIds[2];connections.forEach(function(connection,index){console.log(connection.selected_db);console.log(connection);if(notRemoved&&connection.host==hostname&&connection.port==port&&connection.selected_db==db){notRemoved=false;connections.splice(index,1);}});if(notRemoved){returncallback("Could not remove "+hostname+":"+port+":"+db+" from default connections.");}else{returncallback(null,connections);}}