mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-01-31 00:23:58 +00:00
Add ping/pong to API so controller supervisor in Central can do a full-path check of controller uptime, etc.
This commit is contained in:
parent
57b5a33fbb
commit
e5284771e4
@ -1069,13 +1069,17 @@ unsigned int EmbeddedNetworkController::handleControlPlaneHttpPOST(
|
|||||||
|
|
||||||
} // else 404
|
} // else 404
|
||||||
|
|
||||||
} else if (path[0] == "dbtest") {
|
} else if (path[0] == "ping") {
|
||||||
|
|
||||||
json testRec;
|
json testRec;
|
||||||
const uint64_t now = OSUtils::now();
|
const uint64_t now = OSUtils::now();
|
||||||
testRec["clock"] = now;
|
testRec["clock"] = now;
|
||||||
testRec["uptime"] = (now - _startTime);
|
testRec["uptime"] = (now - _startTime);
|
||||||
_db.put("dbtest",testRec);
|
testRec["content"] = b;
|
||||||
|
_db.put("pong",testRec);
|
||||||
|
responseBody = OSUtils::jsonDump(testRec);
|
||||||
|
responseContentType = "application/json";
|
||||||
|
return 200;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user