mirror of
https://github.com/weaveworks/scope.git
synced 2026-08-18 11:56:39 +00:00
log errors on control and pipe websockets as well (now that we can)
This commit is contained in:
+3
-1
@@ -79,6 +79,8 @@ func handleProbeWS(cr ControlRouter) CtxHandlerFunc {
|
||||
return
|
||||
}
|
||||
defer cr.Deregister(ctx, probeID, id)
|
||||
codec.WaitForReadError()
|
||||
if err := codec.WaitForReadError(); err != nil && !xfer.IsExpectedWSCloseError(err) {
|
||||
log.Printf("Error reading from probe %s control websocket: %v", probeID, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+5
-1
@@ -6,6 +6,8 @@ import (
|
||||
log "github.com/Sirupsen/logrus"
|
||||
"github.com/gorilla/mux"
|
||||
"golang.org/x/net/context"
|
||||
|
||||
"github.com/weaveworks/scope/common/xfer"
|
||||
)
|
||||
|
||||
// RegisterPipeRoutes registers the pipe routes
|
||||
@@ -41,7 +43,9 @@ func handlePipeWs(pr PipeRouter, end End) CtxHandlerFunc {
|
||||
defer conn.Close()
|
||||
|
||||
log.Infof("Pipe success %s (%d)", id, end)
|
||||
pipe.CopyToWebsocket(endIO, conn)
|
||||
if err := pipe.CopyToWebsocket(endIO, conn); err != nil && !xfer.IsExpectedWSCloseError(err) {
|
||||
log.Printf("Error copying to pipe %s (%d) websocket: %v", id, end, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user