]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
Remove duplication in `docs/en/docs/reference/websockets.md`
authorYurii Motov <yurii.motov.monte@gmail.com>
Mon, 26 Jan 2026 16:41:23 +0000 (17:41 +0100)
committerYurii Motov <yurii.motov.monte@gmail.com>
Mon, 26 Jan 2026 16:41:23 +0000 (17:41 +0100)
docs/en/docs/reference/websockets.md

index 24100834f08ac2c96cf6de612e00dd7e04697c9c..13c6c5504e44514383b636accdba53fb25acdc8f 100644 (file)
@@ -46,16 +46,6 @@ When you want to define dependencies that should be compatible with both HTTP an
             - send_json
             - close
 
-When a client disconnects, a `WebSocketDisconnect` exception is raised, you can catch it.
-
-You can import it directly form `fastapi`:
-
-```python
-from fastapi import WebSocketDisconnect
-```
-
-::: fastapi.WebSocketDisconnect
-
 ## WebSockets - additional classes
 
 Additional classes for handling WebSockets.
@@ -68,4 +58,16 @@ from fastapi.websockets import WebSocketDisconnect, WebSocketState
 
 ::: fastapi.websockets.WebSocketDisconnect
 
+When a client disconnects, a `WebSocketDisconnect` exception is raised, you can catch it.
+
+You can import it directly form `fastapi`:
+
+```python
+from fastapi import WebSocketDisconnect
+```
+
+Read more about it in the [FastAPI docs for WebSockets](https://fastapi.tiangolo.com/advanced/websockets/#handling-disconnections-and-multiple-clients)
+
 ::: fastapi.websockets.WebSocketState
+
+`WebSocketState` is an enumeration of the possible states of a WebSocket connection.
\ No newline at end of file