Explorar o código

Merge pull request #35720 from ripcurld0/weboscket_debug

Add a debug message when client closes websocket attach connection
Sebastiaan van Stijn %!s(int64=7) %!d(string=hai) anos
pai
achega
9f5540f672
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      api/server/router/container/container_routes.go

+ 5 - 1
api/server/router/container/container_routes.go

@@ -593,7 +593,11 @@ func (s *containerRouter) wsContainersAttach(ctx context.Context, w http.Respons
 	close(done)
 	select {
 	case <-started:
-		logrus.Errorf("Error attaching websocket: %s", err)
+		if err != nil {
+			logrus.Errorf("Error attaching websocket: %s", err)
+		} else {
+			logrus.Debug("websocket connection was closed by client")
+		}
 		return nil
 	default:
 	}