public void Relinquish(IRemoteServerConnection connection) { try { var channel = GetServiceInterface(); IAsyncResult result = channel.BeginCloseConnection(((ClientConnection)connection).ConnectionHandle, null, null); result.AsyncWaitHandle.WaitOne(); channel.EndCloseConnection(result); } catch (FaultException <DataphorFault> fault) { throw DataphorFaultUtility.FaultToException(fault.Detail); } catch (CommunicationException ce) { ReportCommunicationError(); throw new ServerException(ServerException.Codes.CommunicationFailure, ErrorSeverity.Environment, ce); } }
public void Relinquish(IRemoteServerConnection connection) { RemoteServerConnection localConnection = connection as RemoteServerConnection; localConnection.CloseSessions(); BeginCall(); try { _connections.SafeDisown(localConnection); } finally { EndCall(); } try { localConnection.Dispose(); } catch (Exception E) { throw WrapException(E); } }