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

Gh 10025 #10062

Merged
merged 6 commits into from
Mar 29, 2021
Merged

Gh 10025 #10062

merged 6 commits into from
Mar 29, 2021

Conversation

IslandRhythms
Copy link
Collaborator

Some tests are failing but they were failing before I made these changes.

@IslandRhythms IslandRhythms linked an issue Mar 24, 2021 that may be closed by this pull request
test/connection.test.js Outdated Show resolved Hide resolved
@@ -70,7 +70,12 @@ function Connection(base) {
this._closeCalled = false;
this._hasOpened = false;
this.plugins = [];
this.id = id++;
// this.id = id++;
if (typeof base === 'undefined' || !base.connections.length) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd just get rid of this if statement, shouldn't be necessary because Connection constructor is private so base should always be a Mongoose instance.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

capture
without this if statement these errors pop up

lib/connection.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@vkarpov15 vkarpov15 left a comment

Choose a reason for hiding this comment

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

Nice 👍

@vkarpov15 vkarpov15 merged commit 2aef528 into master Mar 29, 2021
@vkarpov15 vkarpov15 deleted the gh-10025 branch March 29, 2021 12:19
@vkarpov15 vkarpov15 added this to the 5.12.3 milestone Mar 29, 2021
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.

Connection id should be scoped per Mongoose instance
2 participants