Преглед на файлове

Merge pull request #35720 from ripcurld0/weboscket_debug

Add a debug message when client closes websocket attach connection
Sebastiaan van Stijn преди 7 години
родител
ревизия
9f5540f672
променени са 1 файла, в които са добавени 5 реда и са изтрити 1 реда
  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)
 	close(done)
 	select {
 	select {
 	case <-started:
 	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
 		return nil
 	default:
 	default:
 	}
 	}