Skip to content
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

Update async usages in README and examples to shutdown properly #727

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

Conversation

michaelmcguire
Copy link

Motivation:

In several examples of async/await support, the call to shutdown() on the HTTPClient are made with await but do not call get() on the EventLoopFuture.

Modifications:

Add the .get() call in four locations that need it.

Result:

After fixing this, the client should properly get closed down and there are no longer warnings emitted by the compiler.

Motivation:

In several examples of async/await support, the call to shutdown() on
the HTTPClient are made with await but do not call get() on the
EventLoopFuture.

Modifications:

Add the .get() call in four locations that need it.

Result:

After fixing this, the client should properly get closed down and
there are no longer warnings emitted by the compiler.
@dnadoba
Copy link
Collaborator

dnadoba commented Jan 23, 2024

@swift-server-bot test this please

Copy link
Collaborator

@dnadoba dnadoba left a comment

Choose a reason for hiding this comment

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

There is a shutdown() that is async and needs to be awaited. I'm not sure why you are seeing warnings. Can you please post the exact warning you are seeing? Do you have a reproducer?

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.

3 participants