face: don't crash if Face is destroyed with outstanding io.post
refs #3248
Change-Id: Ifd46e46fb1df849cbb3651204cd5a72f476cb81e
diff --git a/src/face.hpp b/src/face.hpp
index c83a9ae..51a5270 100644
--- a/src/face.hpp
+++ b/src/face.hpp
@@ -187,6 +187,7 @@
* @param host IP address or hostname of the NDN forwarder
* @param port port number or service name of the NDN forwarder (**default**: "6363")
*/
+ explicit
Face(const std::string& host, const std::string& port = "6363");
/**
@@ -744,7 +745,7 @@
unique_ptr<nfd::Controller> m_nfdController;
class Impl;
- unique_ptr<Impl> m_impl;
+ shared_ptr<Impl> m_impl;
};
} // namespace ndn