Skip to content

Commit c746fa8

Browse files
authored
Check all symbol errors immediately
Since we can't do this at compile time, the next best thing is to make sure all symbols are checked at bootup so that the server doesn't randomly shit itself at runtime due to a rarely used symbol changing.
1 parent 14e233a commit c746fa8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/loader.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ void *ModLoaderImpl::loadLib(std::string const &path) {
8989
fullPath = path;
9090
}
9191

92-
void* ret = dlopen(fullPath.c_str(), RTLD_LAZY);
92+
void* ret = dlopen(fullPath.c_str(), RTLD_NOW);
9393
if (!ret) {
9494
Log::error("ModLoader", "Failed loading library %s: %s", fullPath.c_str(), dlerror());
9595
return nullptr;
@@ -123,4 +123,4 @@ void ModLoaderImpl::loadModsFromDirectory(std::string const &path) {
123123
}
124124
closedir(dir);
125125
Log::info("ModLoader", "Loaded %li mods", mods.size());
126-
}
126+
}

0 commit comments

Comments
 (0)