Use copy by value in co-routine handler function

'''
Changes required to avoid corruption of variable in case caller function goes out of scope.
'''

Fixes nvbug https://nvbugspro.nvidia.com/bug/5208433
signed-off-by: <ayushkumart@nvidia.com>
diff --git a/nsmd/nsmEvent/nsmRediscoveryEvent.cpp b/nsmd/nsmEvent/nsmRediscoveryEvent.cpp
index e175c9c..bc477f1 100644
--- a/nsmd/nsmEvent/nsmRediscoveryEvent.cpp
+++ b/nsmd/nsmEvent/nsmRediscoveryEvent.cpp
@@ -127,7 +127,7 @@
 
 requester::Coroutine
     NsmRediscoveryEvent::handleRediscovery(std::shared_ptr<NsmDevice> nsmDevice,
-                                           eid_t& eid)
+                                           eid_t eid)
 {
     while (isRediscoveryRequired)
     {
diff --git a/nsmd/nsmEvent/nsmRediscoveryEvent.hpp b/nsmd/nsmEvent/nsmRediscoveryEvent.hpp
index 0dc0e6d..cc99547 100644
--- a/nsmd/nsmEvent/nsmRediscoveryEvent.hpp
+++ b/nsmd/nsmEvent/nsmRediscoveryEvent.hpp
@@ -38,7 +38,7 @@
     std::map<std::string, std::string> eventData;
     std::string messageArgs{};
     requester::Coroutine handleRediscovery(std::shared_ptr<NsmDevice> nsmDevice,
-                                           eid_t& eid);
+                                           eid_t eid);
     bool isRediscoveryRequired;
     std::coroutine_handle<> rediscoveryTaskHandler;
 };