Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

Commit

Permalink
Fixed issue with CreateRemoteWaitHandle which created a handle on the…
Browse files Browse the repository at this point in the history
… local list instead of the remote.
  • Loading branch information
DJGosnell committed Oct 12, 2016
1 parent 65f9313 commit 33d806c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/DtronixMessageQueue.Tests/Rpc/RpcClientTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,10 @@ public void Client_calls_proxy_method_and_canceles() {
var service = Client.Session.GetProxy<ICalculatorService>();
var token_source = new CancellationTokenSource();

token_source.CancelAfter(200);

bool threw = false;
try {
token_source.CancelAfter(500);
service.LongRunningTask(1, 2, token_source.Token);
} catch (OperationCanceledException) {
threw = true;
Expand Down
2 changes: 1 addition & 1 deletion src/DtronixMessageQueue/Rpc/ResponseWait.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public ResponseWaitHandle CreateRemoteWaitHandle(ushort id) {
};

// Add the wait to the outstanding wait dictionary for retrieval later.
if (local_wait_handles.TryAdd(return_wait.Id, return_wait) == false) {
if (remote_wait_handles.TryAdd(return_wait.Id, return_wait) == false) {
throw new InvalidOperationException($"Id {return_wait.Id} already exists in the remote handles dictionary.");
}

Expand Down

0 comments on commit 33d806c

Please sign in to comment.