Azure / Azure/azure-sdk-for-python
azure-ai-voicelive: unhandled websocket message type CLOSING results in error
- Dominant language
- Python
- Stars
- 5.6k
- Forks
- 3.4k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 193
Description
- **Package Name**: azure-ai-voicelive
- **Package Version**: 1.1.0
- **Operating System**: linux
- **Python Version**: 3.12
**Describe the bug**
When integrated in a websocket, voicelive SDK has no logic to manage `CLOSING` as received websocket message type, only `CLOSE` and `CLOSED`. Other Azure service return closing, resulting in websocket errors. `CLOSING` is fairly common so I believe it should be included, specially since this service is made to be integrated in a websocket with others. You can find the relevant code here: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/voicelive/azure-ai-voicelive/azure/ai/voicelive/aio/_patch.py#L523
**To Reproduce**
Steps to reproduce the behavior:
1. Create the websocket
2. Make the other party return CLOSING
3. Results in error
**Expected behavior**
CLOSING message type should not error out. Either needs to be handled or ignored.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Additional context**
Our session id was: **sess_6Zxvf6tkDngFpn3CwcvbTE**
Please do not hesitate to reach out for more data points. Thank you.
Contributor guide
Assessment
This issue has not been assessed yet.