connection.on('error', function (err) {
console.log(err);
if (err.code === 'ESOCKET') {
console.log('----- Connection lost removing connection from pool -----');
// self.pool.destroy(connection);
connection.close();
connection = new Connection(config);
}
});
我必须使用上面的代码,但我收到连接超时错误消息..
{ [ConnectionError: Connection lost - read ECONNRESET]
message: 'Connection lost - read ECONNRESET',
code: 'ESOCKET' }
请帮助如何解决这个问题...