Remove AsyncResp from openHandler

This change, moving the openHandler back to only supporting websocket
disconnects and not 404s.Because AsyncResp is removed from openHandler.

Tested:
Opened KVM in webui-vue and it works.

Signed-off-by: zhanghaicheng <zhanghch05@inspur.com>
Change-Id: I90811f4ab91ad41cb298877f76252dce80932b2b
diff --git a/include/nbd_proxy.hpp b/include/nbd_proxy.hpp
index 7b90e90..85fb2d4 100644
--- a/include/nbd_proxy.hpp
+++ b/include/nbd_proxy.hpp
@@ -252,17 +252,15 @@
 {
     BMCWEB_ROUTE(app, "/nbd/<str>")
         .websocket()
-        .onopen([](crow::websocket::Connection& conn,
-                   const std::shared_ptr<bmcweb::AsyncResp>& asyncResp) {
+        .onopen([](crow::websocket::Connection& conn) {
             BMCWEB_LOG_DEBUG << "nbd-proxy.onopen(" << &conn << ")";
 
             auto getUserInfoHandler =
-                [&conn, asyncResp](
-                    const boost::system::error_code ec,
-                    boost::container::flat_map<
-                        std::string, std::variant<bool, std::string,
-                                                  std::vector<std::string>>>
-                        userInfo) {
+                [&conn](const boost::system::error_code ec,
+                        boost::container::flat_map<
+                            std::string, std::variant<bool, std::string,
+                                                      std::vector<std::string>>>
+                            userInfo) {
                     if (ec)
                     {
                         BMCWEB_LOG_ERROR << "GetUserInfo failed...";
@@ -302,7 +300,7 @@
                         return;
                     }
 
-                    auto openHandler = [&conn, asyncResp](
+                    auto openHandler = [&conn](
                                            const boost::system::error_code ec,
                                            const dbus::utility::
                                                ManagedObjectType& objects) {