Open DareDevilDenis opened 3 years ago
By changing the channel factory from:
channelFactory = new DuplexChannelFactory<IWCFTestInterface>(instanceContext, binding, endpointAddress);
To:
channelFactory = new ChannelFactory<IWCFTestInterface>(binding, endpointAddress);
The Close() now works as expected on MacOS (i.e. it does not hang and timeout). However, this is not a workable solution because my project requires callbacks so I need a DuplexChannelFactory.
I have a WCF server running on Windows (.Net framework 4.8) using a NetTCP binding. I have both Windows and Mac clients. The same binaries are used on both the Windows and Mac clients. The Windows client is running on .Net framework 4.8, the Mac client is running on Mono 6.12.0.122.
The client is very simple:
It works fine running the client on Windows however when running the client on Mac the call to Close() on the channel always hangs and times out after 1 minute. Note: In both cases the server sees the disconnection immediately after it is sent from the client.
Steps to Reproduce
Using the attached solution: WCFTest.zip
Run the client on Windows with passing the IP address and port of the server:
Run the same client on MacOS:
Output on Windows client:
The channel is closed immediately as expected:
Output on MacOS client:
The call to Close() on channel hangs and then times out after 1 minute: