Add WebSocket workaround test and enhance connection handling
- 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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user