Skip to content

Commit

Permalink
docs: Correct the example for "Starting a server" in the API reference
Browse files Browse the repository at this point in the history
  • Loading branch information
xuanzhi33 committed Feb 28, 2024
1 parent e217458 commit 3d191ce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/websockets/legacy/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,8 @@ class Serve:
server = await serve(...)
await stop
await server.close()
server.close()
await server.wait_closed()
:func:`serve` can be used as an asynchronous context manager. Then, the
server is shut down automatically when exiting the context::
Expand Down

0 comments on commit 3d191ce

Please sign in to comment.