Add WebSocket workaround test and enhance connection handling
Some checks failed
Go / build (push) Has been cancelled
Go / release (push) Has been cancelled

- Introduced a new test file `workaround_test.go` to validate the behavior of a "dumb" WebSocket client that does not handle ping/pong messages correctly, ensuring the connection remains alive through server-side workarounds.
- Updated the `handle-websocket.go` file to improve message size handling and refactor ping/pong logic, allowing for direct message sending and better error management.
- Enhanced the `listener.go` file to support a more robust write channel mechanism, allowing pings to interrupt writes and improving overall connection management.
- Bumped version to v0.23.4 to reflect these changes.
This commit is contained in:
2025-11-03 13:49:14 +00:00
parent 2614b51068
commit ed412dcb7e
6 changed files with 269 additions and 264 deletions

View File

@@ -15,6 +15,7 @@ type WriteRequest struct {
MsgType int
IsControl bool
Deadline time.Time
IsPing bool // Special marker for ping messages
}
// WriteChanSetter defines the interface for setting write channels