(c *websocket.Conn)
| 521 | } |
| 522 | |
| 523 | func (tt *connTest) goEchoLoop(c *websocket.Conn) { |
| 524 | ctx, cancel := context.WithCancel(tt.ctx) |
| 525 | |
| 526 | echoLoopErr := xsync.Go(func() error { |
| 527 | err := wstest.EchoLoop(ctx, c) |
| 528 | return assertCloseStatus(websocket.StatusNormalClosure, err) |
| 529 | }) |
| 530 | tt.t.Cleanup(func() { |
| 531 | cancel() |
| 532 | err := <-echoLoopErr |
| 533 | if err != nil { |
| 534 | tt.t.Errorf("echo loop error: %v", err) |
| 535 | } |
| 536 | }) |
| 537 | } |
| 538 | |
| 539 | func (tt *connTest) goDiscardLoop(c *websocket.Conn) { |
| 540 | ctx, cancel := context.WithCancel(tt.ctx) |
no test coverage detected