fw: invoke FaceTable::remove upon Face::onFail
refs #1358
Change-Id: Ic19a88f0aea5adefbd3179de09f9f4e049922ff8
diff --git a/daemon/fw/face-table.hpp b/daemon/fw/face-table.hpp
index 2415568..2af2b6b 100644
--- a/daemon/fw/face-table.hpp
+++ b/daemon/fw/face-table.hpp
@@ -29,9 +29,6 @@
VIRTUAL_WITH_TESTS void
add(shared_ptr<Face> face);
- VIRTUAL_WITH_TESTS void
- remove(shared_ptr<Face> face);
-
VIRTUAL_WITH_TESTS shared_ptr<Face>
get(FaceId id) const;
@@ -52,6 +49,12 @@
end() const;
private:
+ // remove is private because it's a subscriber of face.onFail event.
+ // face->close() closes a face and would trigger .remove(face)
+ void
+ remove(shared_ptr<Face> face);
+
+private:
Forwarder& m_forwarder;
FaceId m_lastFaceId;
FaceMap m_faces;