Skip to content

Commit 5c81777

Browse files
committed
Update CHANGELOG.md
1 parent 80aa196 commit 5c81777

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,53 @@
11
# CHANGELOG
2+
## Version 0.61.3 (March 2026)
3+
4+
**Released**: March 18, 2026
5+
6+
This release hardens the WebSocket client with improved thread-safety, bounded message queues, and better error handling.
7+
8+
---
9+
10+
### 1. NEW FEATURES
11+
12+
#### **Bounded Message Queue (`queue_maxsize`)**
13+
The `_MistWebsocket` client now supports a `queue_maxsize` parameter to limit the internal message buffer size. When set, incoming messages are dropped with a warning when the queue is full, preventing unbounded memory growth on high-frequency streams.
14+
15+
```python
16+
ws = mistapi.websockets.sites.DeviceStatsEvents(
17+
apisession,
18+
site_ids=["<site_id>"],
19+
queue_maxsize=1000 # Limit buffer to 1000 messages
20+
)
21+
```
22+
23+
---
24+
25+
### 2. IMPROVEMENTS
26+
27+
#### **Thread-Safety Enhancements**
28+
- Added `threading.Lock()` to protect shared state during concurrent access
29+
- Added `_finished` event for cleaner lifecycle management and proper shutdown signaling
30+
31+
#### **Error Handling Hardening**
32+
- User-provided callbacks (`on_open`, `on_message`, `on_error`, `on_close`) are now wrapped in try/except blocks to prevent exceptions from crashing the WebSocket thread
33+
- Added warning when `cloud_uri` does not start with `"api."` (WebSocket URL may be incorrect)
34+
35+
#### **Security: Header Redaction**
36+
- Added `_HeaderRedactFilter` to automatically redact `Authorization` and `Cookie` headers from `websocket-client` debug logs
37+
38+
---
39+
40+
### 3. API CHANGES
41+
42+
#### **Insights API**
43+
Added optional `port_id` query parameter to the following functions for port-level filtering:
44+
- **`getSiteInsightMetricsForDevice()`**
45+
- **`getSiteInsightMetricsForGateway()`**
46+
- **`getSiteInsightMetricsForMxEdge()`**
47+
- **`getSiteInsightMetricsForSwitch()`**
48+
49+
---
50+
251
## Version 0.61.2 (March 2026)
352

453
**Released**: March 17, 2026

0 commit comments

Comments
 (0)