Skip to content

Commit

Permalink
Drpping fmt.Println comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mstoykov committed Apr 10, 2023
1 parent baf151e commit a9f5cb0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
5 changes: 0 additions & 5 deletions websockets/websockets.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,6 @@ func (w *webSocket) loop() {
if err != nil {
w.tq.Queue(func() error {
_ = w.conn.Close() // TODO fix
// fmt.Println("write channel", err)
closeErr := w.connectionClosedWithError(err)
return closeErr
})
Expand Down Expand Up @@ -621,7 +620,6 @@ func (w *webSocket) close(code int, reason string) {
if code == 0 {
code = websocket.CloseNormalClosure
}
// fmt.Println("in Close")
w.writeQueueCh <- message{
mtype: websocket.CloseMessage,
data: websocket.FormatCloseMessage(code, reason),
Expand All @@ -631,7 +629,6 @@ func (w *webSocket) close(code int, reason string) {

func (w *webSocket) queueClose() {
w.tq.Queue(func() error {
// fmt.Println("in close")
w.close(websocket.CloseNormalClosure, "")
return nil
})
Expand All @@ -652,9 +649,7 @@ func (w *webSocket) connectionClosedWithError(err error) error {
if w.readyState == CLOSED {
return nil
}
// fmt.Println(w.url, "closing")
w.readyState = CLOSED
// fmt.Println("closing w.done")
close(w.done)

if err != nil {
Expand Down
3 changes: 0 additions & 3 deletions websockets/websockets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,6 @@ func TestTwoTalking(t *testing.T) {
return
}
}
// fmt.Println(path, "ending")
})

err := ts.ev.Start(func() error {
Expand Down Expand Up @@ -1263,7 +1262,6 @@ func TestLockingUpWithAThrow(t *testing.T) {
ts := newTestState(t)
go destroySamples(ctx, ts.samples)
ts.vu.CtxField = ctx
require.NoError(t, ts.vu.RuntimeField.Set("l", fmt.Println))
err := ts.ev.Start(func() error {
_, runErr := ts.rt.RunString(sr(`
let a = 0;
Expand All @@ -1276,7 +1274,6 @@ func TestLockingUpWithAThrow(t *testing.T) {
})
ws.addEventListener("pong", () => {
// l("pong")
ws.ping()
if (a == connections){
a++
Expand Down

0 comments on commit a9f5cb0

Please sign in to comment.