mirror of
https://github.com/wassname/talk.git
synced 2026-07-20 12:40:47 +08:00
changes
This commit is contained in:
@@ -4,7 +4,7 @@ const url = process.env.TALK_REDIS_URL || 'redis://localhost';
|
||||
|
||||
const client = redis.createClient(url, {
|
||||
retry_strategy: function(options) {
|
||||
if (options.error.code === 'ECONNREFUSED') {
|
||||
if (options.error && options.error.code === 'ECONNREFUSED') {
|
||||
|
||||
// End reconnecting on a specific error and flush all commands with a individual error
|
||||
return new Error('The server refused the connection');
|
||||
@@ -26,10 +26,6 @@ const client = redis.createClient(url, {
|
||||
}
|
||||
});
|
||||
|
||||
// client.on('error', (err) => {
|
||||
// throw err;
|
||||
// });
|
||||
|
||||
client.ping((err) => {
|
||||
if (err) {
|
||||
console.error('Can\'t ping the redis server!');
|
||||
|
||||
Reference in New Issue
Block a user