diff --git a/api/server/container.go b/api/server/container.go index bc3143b6a5..6699b0f876 100644 --- a/api/server/container.go +++ b/api/server/container.go @@ -528,7 +528,8 @@ func (s *Server) wsContainersAttach(version version.Version, w http.ResponseWrit logrus.Errorf("Error attaching websocket: %s", err) } }) - h.ServeHTTP(w, r) + ws := websocket.Server{Handler: h, Handshake: nil} + ws.ServeHTTP(w, r) return nil }