-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Handles are not disposed #30
Labels
bug
Something isn't working
Comments
I think that I managed to fix this at the server side: At least pipelist.exe shows that extra pipes are cleaned away. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Not destroyed handles after a new connection is once used (writeasynch) and disposed. It leads to OutOfMemoryException after many iterations in the same process.
Steps to reproduce the bug
Create a new pipe client:
_client = new PipeClient(uri, ".", null);
_client.ConnectAsync().Wait(30);
_client.ExceptionOccurred += Client_ExceptionOccurred;
_client.MessageReceived += Client_MessageReceived;
Write sometihng to server process:
_client.WriteAsync(messageObject).Wait();
Dispose client after all done:
_client.ExceptionOccurred -= Client_ExceptionOccurred;
_client.MessageReceived -= Client_MessageReceived;
_client.DisconnectAsync().Wait();
_client.DisposeAsync();
_client = null;
Iterate 1000 times -> there are about 1000 more handles in the process. Note: if you omit step 2 - everything works clean.
Expected behavior
No additional handles after 1000 iterations within the same client process
Screenshots
No response
NuGet package version
1.14.8
Platform
Console
IDE
Visual Studio 2022, Visual Studio 2019
Additional context
No response
The text was updated successfully, but these errors were encountered: