Skip to content

Conversation

Nemikolh
Copy link

@Nemikolh Nemikolh commented Mar 2, 2023

This is a possible fix for #626. I wonder if we should return from Comlink.expose a function to deincrement that count again?

allowedOrigins: (string | RegExp)[] = ["*"]
) {
const newCount = (proxyCounter.get(ep) || 0) + 1;
proxyCounter.set(ep, newCount);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few notes:

  • I think proxyCounter should be renamed. Maybe endpointRefCounts ?
  • We might want to return from Comlink.expose a function that decrement that count (so that this can be cleaned)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant