Skip to content

Commit

Permalink
Merge pull request #1290 from kuzalekon/improve/dont-set-promise-real…
Browse files Browse the repository at this point in the history
…isation-for-redis-transporter

Don't plugging third-party Promise library for ioredis in RedisTransporter
  • Loading branch information
icebob authored Jul 28, 2024
2 parents 4f7787a + 3a65b65 commit 1b0dff5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/transporters/redis.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* moleculer
* Copyright (c) 2020 MoleculerJS (https://github.com/moleculerjs/moleculer)
* Copyright (c) 2024 MoleculerJS (https://github.com/moleculerjs/moleculer)
* MIT Licensed
*/

Expand Down Expand Up @@ -38,7 +38,7 @@ class RedisTransporter extends Transporter {
* @memberof RedisTransporter
*/
connect() {
return new Promise((resolve, reject) => {
return new this.broker.Promise((resolve, reject) => {
let clientSub = this.getRedisClient(this.opts);
this._clientSub = clientSub; // For tests

Expand Down Expand Up @@ -164,7 +164,6 @@ class RedisTransporter extends Transporter {
let Redis;
try {
Redis = require("ioredis");
Redis.Promise = this.broker.Promise;
} catch (err) {
/* istanbul ignore next */
this.broker.fatal(
Expand Down

0 comments on commit 1b0dff5

Please sign in to comment.