poke: use unsetInterestFilter on Face instead of shutdown

refs #4642

Change-Id: I7b73c7bcde0763226a15d465046db2f4b7bb9b05
diff --git a/tools/peek/ndnpoke/ndnpoke.cpp b/tools/peek/ndnpoke/ndnpoke.cpp
index 512d75b..1bda0de 100644
--- a/tools/peek/ndnpoke/ndnpoke.cpp
+++ b/tools/peek/ndnpoke/ndnpoke.cpp
@@ -52,10 +52,10 @@
     m_wasDataSent = true;
   }
   else {
-    m_face.setInterestFilter(m_options.prefixName,
-                             bind(&NdnPoke::onInterest, this, _1, _2, dataPacket),
-                             nullptr,
-                             bind(&NdnPoke::onRegisterFailed, this, _1, _2));
+    m_registeredPrefix = m_face.setInterestFilter(m_options.prefixName,
+                                                  bind(&NdnPoke::onInterest, this, _1, _2, dataPacket),
+                                                  nullptr,
+                                                  bind(&NdnPoke::onRegisterFailed, this, _1, _2));
   }
 }
 
@@ -92,7 +92,8 @@
   catch (const Face::OversizedPacketError& e) {
     std::cerr << "Data exceeded maximum packet size" << std::endl;
   }
-  afterFinish();
+
+  m_face.unsetInterestFilter(m_registeredPrefix);
 }
 
 void