Skip to content

Commit

Permalink
fix(oidc): MessageChannel is not closed after message is received (re…
Browse files Browse the repository at this point in the history
…lease) (#1396)

Co-authored-by: rchamot <rchamot@guidewire.com>
  • Loading branch information
radk0s and rchamot authored Jul 2, 2024
1 parent 0bdbf83 commit 77eb9e1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/oidc-client/src/initWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ const sendMessageAsync = (registration) => (data) : Promise<any> => {
} else {
resolve(event.data);
}

messageChannel.port1.close();
messageChannel.port2.close();
};
registration.active.postMessage(data, [messageChannel.port2]);
});
Expand Down

0 comments on commit 77eb9e1

Please sign in to comment.