face: Minor updates of TCP faces

Change-Id: I9a11fb4b2cd1aaaa670313cab0b08f097554e1fc
diff --git a/daemon/face/tcp-channel.cpp b/daemon/face/tcp-channel.cpp
index a983db6..246cdb0 100644
--- a/daemon/face/tcp-channel.cpp
+++ b/daemon/face/tcp-channel.cpp
@@ -154,9 +154,10 @@
 
     NFD_LOG_DEBUG("Connect to remote endpoint failed: "
                   << error.category().message(error.value()));
-    
-    onAcceptFailed("Connect to remote endpoint failed: " +
-                   error.category().message(error.value()));
+
+    if (static_cast<bool>(onAcceptFailed))
+      onAcceptFailed("Connect to remote endpoint failed: " +
+                     error.category().message(error.value()));
     return;
   }