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

SharedDbConnectionScope Connection is null when the asynchronous call is finished #35

Closed
kccarter76 opened this issue Jul 10, 2020 · 1 comment · Fixed by #36
Closed
Labels
bug Something isn't working
Milestone

Comments

@kccarter76
Copy link
Collaborator

kccarter76 commented Jul 10, 2020

Describe the bug
null exception is triggered on the SharedDbConnection scope while asynchronously streaming data from a LoadAsync. this typically is fired at the end of the iterator when it goes to close the connection.

To Reproduce
Steps to reproduce the behavior:

            await foreach (Models.Person person in people.AsAsyncEnumerable().LoadAsync())
            {
                foreach (Models.Renter renter in person.Renters)
                {
                    Context.Renters.Delete(renter);
                }

                Context.People.Delete(person);
            }

Expected behavior
I expect the connection object to not be null, so it can closed and disposed of correctly.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows
  • Version .NetStandard 2.1

Additional context
Add any other context about the problem here.

@kccarter76 kccarter76 added the bug Something isn't working label Jul 10, 2020
@kccarter76 kccarter76 added this to the Version 4.1.0 milestone Jul 10, 2020
kccarter76 added a commit that referenced this issue Jul 10, 2020
@kccarter76 kccarter76 linked a pull request Jul 10, 2020 that will close this issue
@kccarter76
Copy link
Collaborator Author

since enhancing the shared db connection to track all asynchronous threads and the number of times each thread adds a shared connection to the heap. this issue has not occurred in multiple test runs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant