Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
remove second connect call
Browse files Browse the repository at this point in the history
  • Loading branch information
hoeppner-dataport committed Apr 3, 2024
1 parent ebebb2e commit 91d840c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/socket/socket/redis-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@ export class RedisIoAdapter extends IoAdapter {
const subClient = pubClient.duplicate();

await pubClient.connect();
await subClient.connect();
// await subClient.connect(); // returns "Error: Redis is already connecting/connected"

this.adapterConstructor = createAdapter(pubClient, subClient);
}

createIOServer(port: number, options?: ServerOptions): any {
const server = super.createIOServer(port, options);
const server = super.createIOServer(port, {
transports: ['websocket'],
...options,
});
server.adapter(this.adapterConstructor);
return server;
}
Expand Down

0 comments on commit 91d840c

Please sign in to comment.