Add ws compatibility test

This commit is contained in:
世界
2022-09-01 20:04:04 +08:00
parent ef801cbfbe
commit 4a0df713aa
17 changed files with 305 additions and 115 deletions

View File

@@ -167,6 +167,9 @@ func (c *EarlyWebsocketConn) SetWriteDeadline(t time.Time) error {
func wrapError(err error) error {
if websocket.IsCloseError(err, websocket.CloseNormalClosure) {
return io.EOF
}
if websocket.IsCloseError(err, websocket.CloseAbnormalClosure) {
return net.ErrClosed
}
return err