2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-05 16:35:23 +00:00

[#3315] use stopAndPoll

This commit is contained in:
Razvan Becheriu
2024-04-22 20:46:43 +03:00
parent 47eb08fa5c
commit a0707133f8
68 changed files with 204 additions and 455 deletions

View File

@@ -708,12 +708,7 @@ Dhcpv4Srv::~Dhcpv4Srv() {
LOG_ERROR(dhcp4_logger, DHCP4_SRV_UNLOAD_LIBRARIES_ERROR).arg(msg);
}
IOServiceMgr::instance().clearIOServices();
io_service_->stop();
io_service_->restart();
try {
io_service_->poll();
} catch (...) {
}
io_service_->stopAndPoll();
}
void
@@ -1134,6 +1129,7 @@ Dhcpv4Srv::run() {
#endif // ENABLE_AFL
try {
runOne();
// Handle events registered by hooks using external IOService objects.
IOServiceMgr::instance().pollIOServices();
getIOService()->poll();
} catch (const std::exception& e) {