Skip to content

Conversation

@richardstanton
Copy link
Member

@richardstanton richardstanton commented May 2, 2019

After canceling a request, frequently the client gets disposed. In 1.5 this would result in an expected cancelation state. In 2.0 this started throwing a ConnectionLostException if the dispose happened subsequently. Since the lost connection was a result of canceled request and not the cause of it, this adjusts the state of the task to match the expected state.

Tests were added to verify dispose does the expected behavior, as well as a lost connection still results in the ConnectionLostException.

Fixes: #265

@AArnott @tinaschrepfer

@AArnott AArnott changed the base branch from master to v2.0 May 2, 2019 20:42
@AArnott AArnott self-requested a review May 2, 2019 20:43
@AArnott AArnott added this to the v2.0 milestone May 2, 2019
@richardstanton
Copy link
Member Author

Associated bug:
#265

@AArnott AArnott changed the title Canceled and disposed requests sometimes resulted in ConnectionLostException. Canceled requests should prefer throwing OCE over ConnectionLostException May 2, 2019
@AArnott AArnott changed the title Canceled requests should prefer throwing OCE over ConnectionLostException Throw OCE from canceled requests even when remote disconnects before sending cancellation acknowledgment May 2, 2019
@AArnott AArnott merged commit 5c97f65 into microsoft:v2.0 May 3, 2019
AArnott pushed a commit to AArnott/vs-streamjsonrpc that referenced this pull request May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants