Skip to content

Commit 20a4fc2

Browse files
committed
derp/derphttp: remove another log message on failure
1 parent 19bd9ef commit 20a4fc2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

derp/derphttp/websocket.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ package derphttp
88
import (
99
"context"
1010
"crypto/tls"
11-
"log"
1211
"net"
1312
"net/http"
1413

@@ -21,7 +20,7 @@ func init() {
2120
}
2221

2322
func dialWebsocket(ctx context.Context, urlStr string, tlsConfig *tls.Config, httpHeader http.Header) (net.Conn, error) {
24-
c, res, err := websocket.Dial(ctx, urlStr, &websocket.DialOptions{
23+
c, _, err := websocket.Dial(ctx, urlStr, &websocket.DialOptions{
2524
Subprotocols: []string{"derp"},
2625
HTTPHeader: httpHeader,
2726
HTTPClient: &http.Client{
@@ -30,11 +29,11 @@ func dialWebsocket(ctx context.Context, urlStr string, tlsConfig *tls.Config, ht
3029
},
3130
},
3231
})
32+
// We can't log anything here, otherwise it'll appear in SSH output!
3333
if err != nil {
34-
log.Printf("websocket Dial: %v, %+v", err, res)
34+
// log.Printf("websocket Dial: %v, %+v", err, res)
3535
return nil, err
3636
}
37-
// We can't log anything here, otherwise it'll appear in SSH output!
3837
// log.Printf("websocket: connected to %v", urlStr)
3938
netConn := wsconn.NetConn(context.Background(), c, websocket.MessageBinary)
4039
return netConn, nil

0 commit comments

Comments
 (0)