face: implement close-on-idle and persistency change for Ethernet unicast
Change-Id: I255024990a72b8cea5a44fa89f515ad91aadba66
Refs: #4011
diff --git a/daemon/face/websocket-transport.cpp b/daemon/face/websocket-transport.cpp
index 68fd08a..d4bbbac 100644
--- a/daemon/face/websocket-transport.cpp
+++ b/daemon/face/websocket-transport.cpp
@@ -117,13 +117,13 @@
{
NFD_LOG_FACE_TRACE(__func__);
- ++this->nOutPings;
-
websocketpp::lib::error_code error;
m_server.ping(m_handle, "NFD-WebSocket", error);
if (error)
return processErrorCode(error);
+ ++this->nOutPings;
+
this->schedulePing();
}
@@ -138,7 +138,7 @@
void
WebSocketTransport::handlePongTimeout()
{
- NFD_LOG_FACE_WARN(__func__);
+ NFD_LOG_FACE_ERROR("Pong timeout");
this->setState(TransportState::FAILED);
doClose();
}
@@ -154,8 +154,7 @@
// transport is shutting down, ignore any errors
return;
- NFD_LOG_FACE_WARN("Send or ping operation failed: " << error.message());
-
+ NFD_LOG_FACE_ERROR("Send or ping operation failed: " << error.message());
this->setState(TransportState::FAILED);
doClose();
}