poke: exit with status 3 on timeout
Change-Id: Idb021fe1fa1c3d40dbcfc87d4b1dadbea6cb28f6
This commit is contained in:
1 parent
87434bef4b
commit
94dff006fc
3 files changed
+4
-1
No files matched your search
@@ -50,6 +50,8 @@ Exit Status
|
||||
|
||||
2: Malformed command line
|
||||
|
||||
3: No Interests received before the timeout
|
||||
|
||||
5: Prefix registration failed
|
||||
|
||||
Example
|
||||
|
||||
@@ -195,7 +195,7 @@ BOOST_AUTO_TEST_CASE(Timeout)
|
||||
|
||||
this->advanceClocks(io, 1_s, 4);
|
||||
|
||||
BOOST_CHECK(poke->getResult() == NdnPoke::Result::UNKNOWN);
|
||||
BOOST_CHECK(poke->getResult() == NdnPoke::Result::TIMEOUT);
|
||||
BOOST_CHECK_EQUAL(face.sentData.size(), 0);
|
||||
|
||||
// Check for prefix unregistration
|
||||
|
||||
@@ -61,6 +61,7 @@ NdnPoke::start()
|
||||
},
|
||||
[this] (auto&&) {
|
||||
m_timeoutEvent = m_scheduler.schedule(m_options.timeout, [this] {
|
||||
m_result = Result::TIMEOUT;
|
||||
m_registeredPrefix.cancel();
|
||||
});
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user