mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-31 22:15:23 +00:00
[907-remove-kea-thread-library] Finished netconf
This commit is contained in:
@@ -47,6 +47,7 @@ NetconfProcess::run() {
|
|||||||
try {
|
try {
|
||||||
// Initialize netconf agent in a thread.
|
// Initialize netconf agent in a thread.
|
||||||
std::thread th([this]() {
|
std::thread th([this]() {
|
||||||
|
try {
|
||||||
if (shouldShutdown()) {
|
if (shouldShutdown()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -66,8 +67,18 @@ NetconfProcess::run() {
|
|||||||
|
|
||||||
// Call init.
|
// Call init.
|
||||||
agent_.init(cfg_mgr);
|
agent_.init(cfg_mgr);
|
||||||
|
} catch (...) {
|
||||||
|
// Should not happen but in case...
|
||||||
|
std::exception_ptr eptr = std::current_exception();
|
||||||
|
getIoService()->post([eptr] () {
|
||||||
|
if (eptr) {
|
||||||
|
std::rethrow_exception(eptr);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Detach the thread.
|
||||||
th.detach();
|
th.detach();
|
||||||
|
|
||||||
// Let's process incoming data or expiring timers in a loop until
|
// Let's process incoming data or expiring timers in a loop until
|
||||||
|
Reference in New Issue
Block a user