sourcemod icon indicating copy to clipboard operation
sourcemod copied to clipboard

Clear functions if plugin is paused.

Open wS-SM opened this issue 4 years ago • 1 comments

You do fwd->RemoveFunctionsOfPlugin(plugin); only in OnPluginUnloaded. If the plugin has been paused (SetFailState/crash), function GetForwardFunctionCount starts to return not exactly the information we want and there is a chance that we are needlessly calling the event.

wS-SM avatar Oct 09 '21 19:10 wS-SM

It sounds like what you want is a "has active listeners" bit that is maintained within the forward subsystem. That's a reasonable request, but we already do filter for inactive forwards, and the overhead is not high.

dvander avatar Oct 09 '21 19:10 dvander