Search code examples
c#.net-4.0locking.net-remoting

What happens when a connection is terminated in the middle of a remote call on a .NET remoting server?


What is the server-side behavior of a .NET Remoting server when a connected client disconnects in the middle of a remote call? Specifically, if the client application calls myThread.Abort() while waiting for the remote call to return?

Is there anything specifically I need to make sure to handle? And how might this affect the behavior of the server if this were to happen in the middle of a lock block? Could this potentially cause a dead lock for any reason?


Solution

  • Client can be disconnected from .NET Remoting server at any point of time. This is a normal situation and it has no impact on server. The server will complete the handling of a call and then just discard the results without sending them back to the client. All locks will be gracefully exited in any case.