Fix static analysis issues

[1] https://sonarcloud.io/project/issues?impactSeverities=HIGH&issueStatuses=OPEN%2CCONFIRMED&tags=since-c%2B%2B11&types=CODE_SMELL&id=edtanous_bmcweb&open=AY9_HYhXKXKyw1ZFwgTE

Change-Id: If3d42dd1afed1abe8e4a7db02da9c3b26c4508c2
Signed-off-by: Ed Tanous <etanous@nvidia.com>
diff --git a/include/dbus_monitor.hpp b/include/dbus_monitor.hpp
index 39a9897..d774a5f 100644
--- a/include/dbus_monitor.hpp
+++ b/include/dbus_monitor.hpp
@@ -125,15 +125,15 @@
     BMCWEB_ROUTE(app, "/subscribe")
         .privileges({{"Login"}})
         .websocket()
-        .onopen([&](crow::websocket::Connection& conn) {
+        .onopen([](crow::websocket::Connection& conn) {
             BMCWEB_LOG_DEBUG("Connection {} opened", logPtr(&conn));
             sessions.try_emplace(&conn);
         })
-        .onclose([&](crow::websocket::Connection& conn, const std::string&) {
+        .onclose([](crow::websocket::Connection& conn, const std::string&) {
             sessions.erase(&conn);
         })
-        .onmessage([&](crow::websocket::Connection& conn,
-                       const std::string& data, bool) {
+        .onmessage([](crow::websocket::Connection& conn,
+                      const std::string& data, bool) {
             const auto sessionPair = sessions.find(&conn);
             if (sessionPair == sessions.end())
             {