Skip to content

Commit ee997c1

Browse files
xuanzhi33aaugustin
authored andcommitted
docs: Correct the example for "Starting a server" in the API reference
1 parent 96d3adf commit ee997c1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/websockets/legacy/server.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,8 @@ class Serve:
899899
900900
server = await serve(...)
901901
await stop
902-
await server.close()
902+
server.close()
903+
await server.wait_closed()
903904
904905
:func:`serve` can be used as an asynchronous context manager. Then, the
905906
server is shut down automatically when exiting the context::

0 commit comments

Comments
 (0)