Skip to content

Real cancellation and timeout for ConnectAsync - #3167

Merged
roji merged 4 commits into
npgsql:mainfrom
roji:CancellationTokenFlowWarning
Sep 20, 2020
Merged

roji merged 4 commits into
npgsql:mainfrom
roji:CancellationTokenFlowWarning

Conversation

@roji

@roji roji commented Sep 20, 2020

Copy link
Copy Markdown
Member

Also enables the code analysis rule for flowing cancellation tokens
(part of #3162).

Fixes #2860

Also enables the code analysis rule for flowing cancellation tokens
(part of npgsql#3162).

Fixes npgsql#2860
@roji
roji requested a review from YohDeadfall as a code owner September 20, 2020 13:23
@roji
roji requested a review from vonzshik September 20, 2020 13:23
@roji

roji commented Sep 20, 2020

Copy link
Copy Markdown
Member Author

@vonzshik as you've worked on this a lot lately, can you give this a review please?

@vonzshik vonzshik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me!

And I guess now you know, what DoWaitAsync doesn't work very well with the cancellation token 😀 .
But as it will be rewritten with #3142, it should be fine for now.

@roji

roji commented Sep 20, 2020

Copy link
Copy Markdown
Member Author

@YohDeadfall will wait for your sign-off (@Brar you're welcome to look too if interested).

We can progressively enable more rules in .editorconfig, it's easy and it increases code quality.

Comment thread .editorconfig Resolved
Comment thread src/Npgsql/NpgsqlConnector.cs Resolved
@roji

roji commented Sep 20, 2020

Copy link
Copy Markdown
Member Author

@YohDeadfall are you OK for merging?

@roji
roji merged commit 83e8d90 into npgsql:main Sep 20, 2020
@roji
roji deleted the CancellationTokenFlowWarning branch September 20, 2020 16:33
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.

Socket async cancellation and timeout during connection

4 participants