Skip to content

Commit 1cf53fe

Browse files
authored
Fix server shutdown documentation (#1155)
Add server.server_close() call to shutdown example to properly release the port. Without this call, attempting to restart the server on the same port results in "Address already in use" error. Fixes #1068 Signed-off-by: Varun Chawla <varun_6april@hotmail.com>
1 parent a854135 commit 1cf53fe

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

docs/content/exporting/http/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ to shutdown the server gracefully:
2424
```python
2525
server, t = start_http_server(8000)
2626
server.shutdown()
27+
server.server_close()
2728
t.join()
2829
```
2930

0 commit comments

Comments
 (0)