1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-04 15:02:09 +03:00

chore: use short handle for process.nextTick

This commit is contained in:
Ruben Bridgewater
2017-05-28 04:32:29 +02:00
parent 0d53d3dcdf
commit b837b46e76
7 changed files with 17 additions and 27 deletions

View File

@@ -57,14 +57,14 @@ function readyHandler (client) {
if (!client.closing) {
// TODO: These internal things should be wrapped in a
// special error that describes what is happening
process.nextTick(() => client.emit('error', err))
process.nextTick(client.emit, 'error', err)
}
})
}
if (client.monitoring) { // Monitor has to be fired before pub sub commands
client.internalSendCommand(new Command('monitor', [])).catch((err) => {
if (!client.closing) {
process.nextTick(() => client.emit('error', err))
process.nextTick(client.emit, 'error', err)
}
})
}
@@ -86,7 +86,7 @@ function readyHandler (client) {
const args = client.subscriptionSet[key]
client[command]([args]).catch((err) => {
if (!client.closing) {
process.nextTick(() => client.emit('error', err))
process.nextTick(client.emit, 'error', err)
}
})
}