We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab18e33 commit cebc037Copy full SHA for cebc037
redisinsight/api/src/modules/redis/redis.service.ts
@@ -76,7 +76,14 @@ export class RedisService implements OnModuleDestroy {
76
};
77
78
if (found) {
79
- found.client.disconnect();
+ // workaround for concurrent requests.
80
+ // At first try to gracefully close the connection using quit
81
+ try {
82
+ found.client.quit();
83
+ } catch (e) {
84
+ found.client.disconnect();
85
+ }
86
+
87
this.clients.delete(id);
88
this.clients.set(id, clientInstance);
89
return 0; // todo: investigate why we need to distinguish between 1 | 0
0 commit comments