File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -461,7 +461,7 @@ func (tt *connTest) goDiscardLoop(c *websocket.Conn) {
461
461
}
462
462
463
463
func BenchmarkConn (b * testing.B ) {
464
- var benchCases = []struct {
464
+ benchCases : = []struct {
465
465
name string
466
466
mode websocket.CompressionMode
467
467
}{
@@ -655,6 +655,7 @@ func TestConnClosePropagation(t *testing.T) {
655
655
})
656
656
}
657
657
checkReadErr := func (t * testing.T , err error ) {
658
+ // Check read error (output depends on when read is called in relation to connection closure).
658
659
var ce websocket.CloseError
659
660
if errors .As (err , & ce ) {
660
661
assert .Equal (t , "" , websocket .StatusNormalClosure , ce .Code )
@@ -668,7 +669,6 @@ func TestConnClosePropagation(t *testing.T) {
668
669
err := c .Write (context .Background (), websocket .MessageText , want )
669
670
assert .ErrorIs (t , net .ErrClosed , err )
670
671
671
- // Check read error (output depends on when read is called in relation to connection closure).
672
672
_ , _ , err = c .Read (context .Background ())
673
673
checkReadErr (t , err )
674
674
}
You can’t perform that action at this time.
0 commit comments