Correct plugin unload on `meta retry`

Fixes regression introduced in previous commits, and adds back double unload to ``meta retry``, specifically to handle the case of removal and deletion of plugin entry on failure.
This commit is contained in:
GAMMACASE 2025-02-14 19:15:05 +03:00 committed by GitHub
parent a4f4f0ebe0
commit 4fe356b724
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -320,9 +320,10 @@ bool CPluginManager::Retry(PluginId id, char *error, size_t len)
}
else
{
//We don't need to handle any extra unloading,
//as if plugin has failed to load it would be
//unloaded by _Load() method itself
//Since _Load already queues unload on plugin load failure,
//it doesn't removes the plugin from the plugin list nor frees pl
//so an actual _Unload() is still required
_Unload(pl, true, buffer, sizeof(buffer)-1);
//We just wasted an id... reclaim it
m_LastId--;