VOM: stats: Associate stat obj to interface
Change-Id: Id8b159dd72b92798538a32fe570fb0038d742ef2
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
diff --git a/src/vpp-api/vom/rpc_cmd.hpp b/src/vpp-api/vom/rpc_cmd.hpp
index 60dbd47..ae3c675 100644
--- a/src/vpp-api/vom/rpc_cmd.hpp
+++ b/src/vpp-api/vom/rpc_cmd.hpp
@@ -71,7 +71,16 @@
/**
* Fulfill the commands promise. Called from the RX thread
*/
- void fulfill(const DATA& d) { m_promise.set_value(d); }
+ void fulfill(const DATA& d)
+ {
+ m_promise.set_value(d);
+
+ /*
+ * we reset the promise after setting the value to reuse it
+ * when we run the retire command from the same cmd object
+ */
+ m_promise = std::promise<DATA>();
+ }
/**
* Wait on the commands promise. i.e. block on the completion