diff --git a/DtronixMessageQueue.Tests.Performance/RpcPerformanceTest.cs b/DtronixMessageQueue.Tests.Performance/RpcPerformanceTest.cs index fce3a44..458fe29 100644 --- a/DtronixMessageQueue.Tests.Performance/RpcPerformanceTest.cs +++ b/DtronixMessageQueue.Tests.Performance/RpcPerformanceTest.cs @@ -20,7 +20,7 @@ public RpcPerformanceTest(string[] args) { RpcSingleProcessTest(10000, 4, config, RpcTestType.Return); - //RpcSingleProcessTest(10000, 4, config, RpcTestType.Exception); + RpcSingleProcessTest(10000, 4, config, RpcTestType.Exception); } diff --git a/DtronixMessageQueue/Rpc/RpcProxy.cs b/DtronixMessageQueue/Rpc/RpcProxy.cs index de19715..775804d 100644 --- a/DtronixMessageQueue/Rpc/RpcProxy.cs +++ b/DtronixMessageQueue/Rpc/RpcProxy.cs @@ -78,7 +78,7 @@ public override IMessage Invoke(IMessage msg) { return new ReturnMessage(null, null, 0, method_call.LogicalCallContext, method_call); } - return_wait.ReturnResetEvent.Wait(TimeSpan.FromSeconds(1), return_wait.Token); + return_wait.ReturnResetEvent.Wait(TimeSpan.FromSeconds(100), return_wait.Token); if (return_wait.ReturnResetEvent.IsSet == false) { string test = "wait;"; @@ -104,8 +104,8 @@ public override IMessage Invoke(IMessage msg) { return new ReturnMessage(return_value, null, 0, method_call.LogicalCallContext, method_call); case RpcMessageType.RpcCallException: - var return_exception = (RpcRemoteExceptionDataContract)RuntimeTypeModel.Default.DeserializeWithLengthPrefix(store.Stream, null, typeof(RpcRemoteExceptionDataContract), PrefixStyle.Base128, 0); - return new ReturnMessage(new RpcRemoteException(return_exception), method_call); + var return_exception = RuntimeTypeModel.Default.DeserializeWithLengthPrefix(store.Stream, null, typeof(RpcRemoteExceptionDataContract), PrefixStyle.Base128, 0); + return new ReturnMessage(new RpcRemoteException((RpcRemoteExceptionDataContract)return_exception), method_call); default: throw new ArgumentOutOfRangeException(); diff --git a/DtronixMessageQueue/Rpc/RpcSession.cs b/DtronixMessageQueue/Rpc/RpcSession.cs index ee4b619..dd08ddb 100644 --- a/DtronixMessageQueue/Rpc/RpcSession.cs +++ b/DtronixMessageQueue/Rpc/RpcSession.cs @@ -190,7 +190,7 @@ private void SendRpcException(SerializationStore.Store store, Exception ex, usho var exception = new RpcRemoteExceptionDataContract(ex is TargetInvocationException ? ex.InnerException : ex); - RuntimeTypeModel.Default.SerializeWithLengthPrefix(store.Stream, exception, exception.GetType(), PrefixStyle.Base128, 1); + RuntimeTypeModel.Default.SerializeWithLengthPrefix(store.Stream, exception, exception.GetType(), PrefixStyle.Base128, 0); store.MessageWriter.Write(store.Stream.ToArray());