Skip to content

Commit 3459520

Browse files
Prevent closing the Redis client connection if already inactive
1 parent 5e1a2c6 commit 3459520

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

react_on_rails_pro/spec/dummy/client/app/utils/redisReceiver.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,9 @@ export function listenToRequestData(requestId: string): RequestListener {
301301
* Closes the Redis client connection
302302
*/
303303
close: async () => {
304+
if (!isActive) {
305+
return;
306+
}
304307
isActive = false;
305308

306309
// Reject and cleanup all pending promises

0 commit comments

Comments
 (0)