face: avoid multiple onFail events
refs #1497
Change-Id: I8fda3fea5cd8a314b30eef45da104109e9748afc
diff --git a/daemon/face/datagram-face.hpp b/daemon/face/datagram-face.hpp
index e6a6929..2dbe8fa 100644
--- a/daemon/face/datagram-face.hpp
+++ b/daemon/face/datagram-face.hpp
@@ -1,11 +1,12 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014 Regents of the University of California,
- * Arizona Board of Regents,
- * Colorado State University,
- * University Pierre & Marie Curie, Sorbonne University,
- * Washington University in St. Louis,
- * Beijing Institute of Technology
+ * Copyright (c) 2014, Regents of the University of California,
+ * Arizona Board of Regents,
+ * Colorado State University,
+ * University Pierre & Marie Curie, Sorbonne University,
+ * Washington University in St. Louis,
+ * Beijing Institute of Technology,
+ * The University of Memphis
*
* This file is part of NFD (Named Data Networking Forwarding Daemon).
* See AUTHORS.md for complete list of NFD authors and contributors.
@@ -155,7 +156,7 @@
if (!m_socket->is_open())
{
- onFail("Tunnel closed");
+ fail("Tunnel closed");
return;
}
@@ -168,11 +169,11 @@
if (error == boost::asio::error::eof)
{
- onFail("Tunnel closed");
+ fail("Tunnel closed");
}
else
{
- onFail("Send operation failed, closing socket: " +
+ fail("Send operation failed, closing socket: " +
error.category().message(error.value()));
}
return;
@@ -196,7 +197,7 @@
<< "] Close tunnel");
closeSocket();
- onFail("Close tunnel");
+ fail("Close tunnel");
}
template <class T>
@@ -224,7 +225,7 @@
// this should be unnecessary, but just in case
if (!m_socket->is_open())
{
- onFail("Tunnel closed");
+ fail("Tunnel closed");
return;
}
@@ -237,11 +238,11 @@
if (error == boost::asio::error::eof)
{
- onFail("Tunnel closed");
+ fail("Tunnel closed");
}
else
{
- onFail("Receive operation failed, closing socket: " +
+ fail("Receive operation failed, closing socket: " +
error.category().message(error.value()));
}
return;