face: UnixStreamChannel: improved handling of existing socket files.
Add logic to prevent accidental removal of a socket file that belongs
to another (still running) NFD process.
Refs: #1360, #1367
Change-Id: Ibf755cd55e27f5a4cf165a0fbcdbf01fdb33005a
diff --git a/daemon/face/unix-stream-channel.hpp b/daemon/face/unix-stream-channel.hpp
index 3f4be84..e706a53 100644
--- a/daemon/face/unix-stream-channel.hpp
+++ b/daemon/face/unix-stream-channel.hpp
@@ -79,10 +79,6 @@
private:
void
- createFace(const shared_ptr<boost::asio::local::stream_protocol::socket>& socket,
- const FaceCreatedCallback& onFaceCreated);
-
- void
handleSuccessfulAccept(const boost::system::error_code& error,
const shared_ptr<boost::asio::local::stream_protocol::socket>& socket,
const FaceCreatedCallback& onFaceCreated,
@@ -91,6 +87,7 @@
private:
unix_stream::Endpoint m_endpoint;
shared_ptr<boost::asio::local::stream_protocol::acceptor> m_acceptor;
+ bool m_isListening;
};
} // namespace nfd