Rename event <disconnection> to <disconnected> (to mantain compliance).

This commit is contained in:
Davide Casale
2023-10-01 21:37:43 +02:00
parent 8a1632d3c2
commit ca4050a35b
3 changed files with 5 additions and 5 deletions

View File

@@ -181,10 +181,10 @@ A custom [close code number](https://www.iana.org/assignments/websocket/websocke
await bfx.wss.close(code=1001, reason="Going Away")
```
After closing the connection, the client will emit the `disconnection` event:
After closing the connection, the client will emit the `disconnected` event:
```python
@bfx.wss.on("disconnection")
def on_disconnection(code: int, reason: str):
@bfx.wss.on("disconnected")
def on_disconnected(code: int, reason: str):
if code == 1000 or code == 1001:
print("Closing the connection without errors!")
```