Skip to content

Commit

Permalink
Regular bool
Browse files Browse the repository at this point in the history
  • Loading branch information
xacrimon committed Apr 6, 2022
1 parent 04b764f commit c566e34
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/web/apiserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1045,13 +1045,13 @@ func (s *WebSuite) TestTerminalPing(c *C) {
ws, err := s.makeTerminal(s.authPack(c, "foo"))
c.Assert(err, IsNil)
defer ws.Close()
closed := new(bool)
closed := false

done := make(chan struct{})
ws.SetPingHandler(func(message string) error {
if *closed == false {
if closed == false {
close(done)
*closed = true
closed = true
}

err := ws.WriteControl(websocket.PongMessage, []byte(message), time.Now().Add(time.Second))
Expand Down

0 comments on commit c566e34

Please sign in to comment.