Skip to content

Add CT to DiscordClient#ConnectAsync #2011

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

VelvetToroyashi
Copy link
Member

No description provided.

@Plerx2493 Plerx2493 added this to the v5.0 milestone Jul 16, 2024
@@ -36,6 +36,7 @@ private async Task ReceiveGatewayEventsAsync()
{
while (!this.eventReader.Completion.IsCompleted)
{
// Open question: Do we want to pass a CT here?
Copy link
Member

Choose a reason for hiding this comment

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

Yes because this loop waits until the next recieved gw event

Copy link
Member Author

Choose a reason for hiding this comment

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

The CT is cancelled further up, which should in theory gracefully close the channel, instead of outright aborting it? ChannelClosedException vs OperationCancelledException, I'll have to look at this more closely.

Copy link
Member

Choose a reason for hiding this comment

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

have you perchance looked at this more closely?

Copy link
Member Author

@VelvetToroyashi VelvetToroyashi Jul 24, 2024

Choose a reason for hiding this comment

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

I can when I'm not 6 hours past my sleep schedule
(also you can't just say perchance)

Copy link
Member

Choose a reason for hiding this comment

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

It's valid to be thorough and add an extra check if we're not sure. Or- like aki said, double check :))

Copy link
Member

@akiraveliara akiraveliara left a comment

Choose a reason for hiding this comment

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

mergeable if plerx' comment is addressed

@Naamloos
Copy link
Member

Is there any plan to finish this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants