In Transport, added getIsConnected
diff --git a/ndn-cpp/node.cpp b/ndn-cpp/node.cpp
index b5d61d9..44bd7e9 100644
--- a/ndn-cpp/node.cpp
+++ b/ndn-cpp/node.cpp
@@ -76,8 +76,10 @@
shared_ptr<vector<unsigned char> > encoding = pitEntry->getInterest()->wireEncode();
- // TODO: Check if we are already connected.
- transport_->connect(*this);
+ // TODO: Properly check if we are already connected to the expected host.
+ if (!transport_->getIsConnected())
+ transport_->connect(*this);
+
transport_->send(*encoding);
}