mirror of
https://github.com/mattermost/mattermost.git
synced 2026-05-28 04:35:04 -04:00
* fix(mmctl): prevent nil pointer panic in websocket command on connection failure When the WebSocket connection fails immediately, Listen() closes EventChannel via defer. Reading from a closed channel with a plain receive returns nil, causing a panic in ToJSON(). Switch to range so the loop exits cleanly, add a nil guard, and surface ListenError to the caller. Fixes MM-68351 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test(mmctl): add unit tests for websocket nil event and ListenError handling Extracts the event-processing loop into processWebSocketEvents to enable unit testing, and adds tests covering the nil-event skip and error surfacing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test(mmctl): add happy-path subtest for processWebSocketEvents Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| client | ||
| commands | ||
| docs | ||
| mocks | ||
| printer | ||
| mmctl.go | ||
| README.md | ||
mmctl
mmctl is a remote CLI tool that lets you manage your Mattermost instance from the terminal.
The project's documentation can be accessed within the the Mattermost documentation.