Bug 1570 - Framework continue calling BeginReceive, while EndReceive returns null message indicating that channel is closed gracefully.
Summary: Framework continue calling BeginReceive, while EndReceive returns null messag...
Alias: None
Product: Class Libraries
Classification: Mono
Component: WCF assemblies ()
Version: 2.10.x
Hardware: PC Linux
: Normal normal
Target Milestone: Untriaged
Assignee: marcos.henrich
Depends on:
Reported: 2011-10-19 09:18 UTC by Arman Djusupov
Modified: 2014-12-09 06:04 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Arman Djusupov 2011-10-19 09:18:01 UTC
I'm porting the custom WCF transport to Mono and encounter this difference in behavior between WCF.NET and WCF Mono implementations, that prevents my channels from closing gracefully. 

My custom channel implements IDuplexSessionChannel and IDuplexChannel interface.

When connection is being closed gracefully, EndReceive method returns null message which indicates that input channel is closed. 

When channel run in .NET runtime, once EndReceive returns null message, framework closes the channel and everything works fine. 

When channel run on Mono runtime, once receiving null message framework call  BeginReceive continuously, getting null message from EndReceive every time, but not closing the channel, like it expect the channel to throw an exception.

Throwing an exception would probably solve the issue, but I believe that it's preferable if WCF would behave the same way on .NET and Mono.
Comment 1 marcos.henrich 2014-08-11 15:04:21 UTC
Hi Arman,

Thank you for the bug report.

Unfortunately it does not contain enough details and I am not able to reproduce it in my end. 

Can you provide a test case?
Comment 2 marcos.henrich 2014-12-09 06:04:32 UTC
Unable to reproduce the issue from the bug description.