if (aittThread.joinable())
aittThread.join();
+
+ discovery.SetMQ(nullptr);
+ mq = nullptr;
}
void AITT::Impl::ThreadMain(void)
ModuleManager::ModuleHandle ModuleManager::OpenModule(const char *file)
{
- ModuleHandle handle(dlopen(file, RTLD_LAZY | RTLD_LOCAL), [](const void *handle) -> void {
- if (dlclose(const_cast<void *>(handle)))
+ ModuleHandle handle(dlopen(file, RTLD_LAZY | RTLD_LOCAL), [](void *handle) {
+ if (dlclose(handle))
ERR("dlclose: %s", dlerror());
});
if (handle == nullptr)
std::unique_ptr<MQ> NewCustomMQ(const std::string &id, const AittOption &option);
private:
- using ModuleHandle = std::unique_ptr<void, void (*)(const void *)>;
+ using ModuleHandle = std::unique_ptr<void, void (*)(void *)>;
// It should be ("the number of shifts" - 1) of AittProtocol
enum TransportType {