Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reuse sessions with many origins #20

Closed
wants to merge 3 commits into from
Closed

Reuse sessions with many origins #20

wants to merge 3 commits into from

Conversation

szmarczak
Copy link
Owner

Fixes #17

source/agent.js Outdated Show resolved Hide resolved
source/agent.js Outdated Show resolved Hide resolved
@szmarczak
Copy link
Owner Author

The current implementation is bad because it requires another array for all sessions. Instead, we can move to something like this:

this.freeSessions = {
	[options]: [session]
};

To connect we need to do:

this.freeSessions[options].filter(session => {
	return session.originSet.includes(origin);
})

We get an array of sessions we can use.

@szmarczak szmarczak closed this Aug 1, 2019
@szmarczak
Copy link
Owner Author

Moved to #21

@szmarczak szmarczak deleted the many-origins branch November 3, 2019 18:56
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.

Close sessions which originSet is fully covered by other sessions and reuse those
1 participant