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

docs: Correct the example for "Starting a server" in the API reference #1448

Merged
merged 2 commits into from
Jul 21, 2024

Conversation

xuanzhi33
Copy link
Contributor

It seems that server.close() is not an async function, so I changed

await server.close()

to

server.close()
await server.wait_closed()

in the API reference.

@aaugustin
Copy link
Member

Thank for you the fix — indeed close() isn't a coroutine:

def close(self, close_connections: bool = True) -> None:

I'm going to check how I introduced this mistake and merge the fix.

@xuanzhi33
Copy link
Contributor Author

I found the same mistake in the FAQ and fixed it.

@aaugustin aaugustin merged commit 1210ee8 into python-websockets:main Jul 21, 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