Commit Graph
12 Commits
Author SHA1 Message Date
Alexander Köplinger 672cc68198 [ServiceModel] Make TcpReplyChannel.OnClose thread-safe
We were seeing the following unhandled exception on Jenkins:

````
Unhandled exceptions:
1) MonoTests.System.ServiceModel.OperationContextTest.Current : System.NullReferenceException: Object reference not set to an instance of an object
  at System.ServiceModel.Channels.NetTcp.TcpReplyChannel.OnClose (TimeSpan timeout) [0x00000] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/mcs/class/System.ServiceModel/System.ServiceModel.Channels.NetTcp/TcpReplyChannel.cs:141
  at System.ServiceModel.Channels.CommunicationObject.Close (TimeSpan timeout) [0x0001c] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/mcs/class/System.ServiceModel/System.ServiceModel.Channels/CommunicationObject.cs:140
  at System.ServiceModel.Channels.CommunicationObject.Close () [0x00000] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/mcs/class/System.ServiceModel/System.ServiceModel.Channels/CommunicationObject.cs:131
  at System.ServiceModel.Dispatcher.ListenerLoopManager.TryReceiveRequestDone (IAsyncResult result) [0x00027] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armhf/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChannelDispatcher.cs:583
```

This happens because multiple threads can call OnClose() and so `client` can be null.

Fixed this by taking code from HttpReplyChannel.OnClose which handled this already and also fixed the race condition there (the checks need to happen under a lock).
2015-12-21 14:33:14 +01:00
Miguel de Icaza 559ad5b34b Merge pull request #463 from strawd/concurrent-requests
Handle multiple concurrent calls to BeginTryReceiveRequest
2015-09-23 14:37:01 -04:00
Martin Baulig 85147e732a [#1340][WCF]: Fix null reference when using invalid HTTP methods. 2012-09-19 06:28:47 +02:00
David Straw 14b42141c0 Handle multiple concurrent calls to BeginTryReceiveRequest 2012-09-17 11:39:30 -06:00
Atsushi Eno fd8ae35df0 Support RemoteEndpointMessageProperty. 2011-06-03 19:46:01 +09:00
Atsushi Eno 98d06d92e5 Log HTTP reply Message too. Make logging customizible on under the moon.
Logging is done only when requested by MOON_WCF_TRACE=[stdout|stderr]
environment variable.
2011-04-23 02:05:35 +09:00
Atsushi Eno 4beb53c9e2 One more step to enable WCF diagnostics in Logger, and add HttpReplyChannel log. 2011-04-15 14:45:39 +09:00
Atsushi Eno 1fe37c584d HTTP authentication in HttpListener had dropped during refactoring. Now it's back. 2011-02-17 21:04:34 +09:00
Atsushi Eno dbfe965d11 Add not-working code for TransferMode support. 2010-08-30 18:15:26 +09:00
Atsushi Eno 64372ac47a 2010-07-14 Atsushi Enomoto <[email protected]>
* BinaryMessageEncoder.cs, MessageEncoder.cs:
	  The default content type value is null, not the ContentType value.

	* HttpReplyChannel.cs : pass HTTP ContentType header value to
	  MessageEncoder.ReadMessage().


svn path=/trunk/mcs/; revision=160376
2010-07-14 18:20:24 +00:00
Atsushi Eno cb97b9bb02 2010-07-05 Atsushi Enomoto <[email protected]>
* HttpRequestContext.cs, HttpChannelListener.cs, HttpReplyChannel.cs:
	  rename unnecessary "Standalone" (removed).

	* HttpTransportbindingElement.cs : remove "Standalone".


svn path=/trunk/mcs/; revision=159916
2010-07-05 17:39:40 +00:00
Atsushi Eno ab39e8acac 2010-07-05 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs :
	  moved IChannelDispatcherBoundListener from HttpChannelListener.cs.

	* SvcHttpHandler.cs : removed old code and #if blocks.

	* HttpStandaloneReplyChannel.cs
	  HttpStandaloneRequestContext.cs
	  HttpStandaloneChannelListener.cs
	  HttpReplyChannel.cs
	  HttpRequestContext.cs
	  HttpChannelListener.cs : renamed former 3 files to latter 3 files.

	* System.ServiceModel.dll.sources :
	  renamed new HTTP channel listener implementation sources, and
	  removed old sources.



svn path=/trunk/mcs/; revision=159913
2010-07-05 17:29:24 +00:00