-
Notifications
You must be signed in to change notification settings - Fork 560
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
NetTcpBinding repeated connections and disconnections with ReliableSession: Close() on channel sometimes takes a long time #4746
Comments
@DareDevilDenis, good news, I found the problem and this will be in the RTM release. Having the repro app really helped. Thank you. |
Our RTM build is released at the same time as .NET 6 goes RTM. It's been announced that .NET 6 will be release during .NET Conf which is November 9 - 11. |
Thanks :) |
Hi @mconnew. I have a couple of dumb questions (apologies in advance!). The second one is off topic for this thread but I didn't think it was worth raising as a separate issue. Question 1 Question 2
So I guess that means that the upcoming wcf release in November can be used with .NET 5 and .NET 6, right? |
any news? |
@onefreddy, news about what? We shipped a fix for this issue last year. You need to be using the latest package versions. |
I dont see this issue being fixed i m using .NET 6.0 , but i still see the same issue reported here |
Describe the bug
I have a WCF NetTcpBinding server (.NET framework 4.8) that has a binding that uses ReliableSession. I have a WCF client running on the same PC that repeatedly (in a loop 5000 times) creates a channel, calls a WCF API method on the server, and closes the channel (this configuration is used to demonstrate the problem). Using a .NET 5.0 WCF client (version 4.9.0-rc2.21473.1 of System.ServiceModel.Primitives, System.ServiceModel.NetTcp, System.ServiceModel.Duplex)
Each call to:
((ICommunicationObject)channel).Close();
is usually fast (less than 1ms), however sometimes Close() gets stuck for 1 minute (the default value for CloseTimeout). This can be seen in the output of the attached solution (which runs in a loop 5000 times):
In my run of 5000 iterations on Win10 this 1 minute delay happened 4 times.
Using a .NET Framework 4.8 WCF client with exactly the same code it works fine.
If I turn off ReliableSession then the .NET 5.0 client works fine.
To Reproduce
Run the attached sample project on a single Windows PC: WcfClientServerPings.zip
Command window 1:
Command window 2:
Note: The client and server are hardcoded to talk on port 5156. If this port is in use on your PC just change 'const int port' on both the client and server.
Expected behavior
Since both the client and server are running on the same PC there should be no big delay when calling Close().
Additional notes
I originally raised issue #4734 when using version 4.8.1 of the System.ServiceModel DLLs. I was advised to move to 'RC2' and that's when I encountered this new issue.
The text was updated successfully, but these errors were encountered: