Skip to content

Commit

Permalink
Properly unsubscribe after receiving a pong
Browse files Browse the repository at this point in the history
  • Loading branch information
faergeek committed Apr 6, 2023
1 parent dc2ed06 commit 79aa105
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/ipc/ipc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,9 @@ export function createIpcCallProxy<K extends string, T extends ApiObject<K>>(

pipe(
responseSource,
subscribe(response => {
if (response !== 'KEEPER_PONG') {
return;
}

filter(response => response === 'KEEPER_PONG'),
take(1),
subscribe(() => {
clearTimeout(retryTimeout);
resolve();
})
Expand Down

0 comments on commit 79aa105

Please sign in to comment.