src: Adding retry in case of prefix registration fails

Change-Id: Ia124ab393c665b29f03216903128de98bd68de9d
diff --git a/src/nlsr.cpp b/src/nlsr.cpp
index 51bf86a..4065482 100644
--- a/src/nlsr.cpp
+++ b/src/nlsr.cpp
@@ -148,7 +148,13 @@
   m_defaultIdentity = m_confParam.getRouterPrefix();
   m_defaultIdentity.append("NLSR");
 
-  m_keyChain.deleteIdentity(m_defaultIdentity);
+  try
+  {
+    m_keyChain.deleteIdentity(m_defaultIdentity);
+  }
+  catch (std::exception& e)
+  {
+  }
 
   ndn::Name keyName = m_keyChain.generateRsaKeyPairAsDefault(m_defaultIdentity, true);