Skip to content

Commit 4605713

Browse files
additional changes for disposable
1 parent 4908f44 commit 4605713

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/JsonRpc/InputHandler.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,9 @@ private void HandleRequest(string request)
236236

237237
public void Dispose()
238238
{
239+
_scheduler.Dispose();
239240
_outputHandler.Dispose();
240241
_inputThread = null;
241-
_scheduler.Dispose();
242242
_input?.Dispose();
243243
}
244244
}

src/JsonRpc/OutputHandler.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ private void ProcessOutputQueue()
7171
catch (OperationCanceledException ex)
7272
{
7373
if (ex.CancellationToken != token)
74-
_outputIsFinished.SetException(ex);
74+
_outputIsFinished.TrySetException(ex);
7575
// else ignore. Exceptions: OperationCanceledException - The CancellationToken has been canceled.
7676
}
7777
catch (Exception e)
7878
{
79-
_outputIsFinished.SetException(e);
79+
_outputIsFinished.TrySetException(e);
8080
}
8181
}
8282

0 commit comments

Comments
 (0)