I have a workaround in place for now and I don't think I'll have time
to create a patch this week, but I'll try to do it next week.
Cheerio
Tymek
On 26 September 2011 23:11, Tymek Majewski
Please remember that the environment I'm working on is mono-2.6.7 on
Linux. The output on Windows may, and most likely be different.
Cheerio
Tymek
It's not a really a mono 'issue' as in 'bug'.
Anyway the testcase
ServiceStack.WebHost.Endpoints.Tests.RemoteEndDropsConnectionTests and
the code changes included in the pull request are confirmed to show
the code flow on Windows too.
The test shows really one one possible network error - in reality I
can see variations in the errors returned by Write*ToResponse methods.
The code changes I proposed in the pull request deal with the class of
errors not particular scenario.
Just for paranoia reasons, in case you'll get something else, here
are my test results from Windows Vista:
NUnit version 2.5.10.11092
Copyright (C) 2002-2009 Charlie Poole.
Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
Copyright (C) 2000-2002 Philip Craig.
All Rights Reserved.
Runtime Environment -
OS Version: Microsoft Windows NT 6.0.6002 Service Pack 2
CLR Version: 2.0.50727.4216 ( Net 2.0 )
ProcessModel: Default DomainUsage: Single
Execution Runtime: Default
Selected test(s):
ServiceStack.WebHost.Endpoints.Tests.RemoteEndDropsConnectionTests
ExampleAppHost Created at 20/10/2011 9:11:19 AM, listening on
http://localhost:82/
***** ServiceStack.WebHost.Endpoints.Tests.RemoteEndDropsConnectionTests.TestClientDropsConnection(True)
TEST: ERROR: Error occured while Processing Request:
[HttpListenerException] The specified network name is no longer
available, Exception: The specified network name is no longer
available
TEST: ERROR: Could not WriteTextToResponse: This operation cannot be
performed after the response has been submitted., Exception: This
operation cannot be performed after the response has been submitted.
TEST: ERROR: Could not WriteTextToResponse: This operation cannot be
performed after the response has been submitted., Exception: This
operation cannot be performed after the response has been submitted.
TEST: INFO: Failed to write error to response: {0}, Exception: This
operation cannot be performed after the response has been submitted.
TEST: ERROR: Error in HttpListenerResponseWrapper: An operation was
attempted on a nonexistent network connection, Exception: An operation
was attempted on a nonexistent network connection
TEST: ERROR: Error occured while Processing Request: The specified
network name is no longer available, Exception: The specified network
name is no longer available
***** ServiceStack.WebHost.Endpoints.Tests.RemoteEndDropsConnectionTests.TestClientDropsConnection(False)
TEST: ERROR: Error in HttpListenerResponseWrapper: An operation was
attempted on a nonexistent network connection, Exception: An operation
was attempted on a nonexistent network connection
TEST: ERROR: Error this.ProcessRequest(context):
[HttpListenerException]: The specified network name is no longer
available
Tests run: 2, Errors: 0, Failures: 0, Inconclusive: 0, Time: 6.909 seconds
Not run: 0, Invalid: 0, Ignored: 0, Skipped: 0
Hit <enter> key to continue