AlternateLife / RageMP.Net

RAGE Multiplayer .NET Core Wrapper
https://ragemp.alternate-life.de
MIT License
23 stars 14 forks source link

IResource.OnStopAsync never called #93

Open aviadmini opened 5 years ago

aviadmini commented 5 years ago

Is that by design?

Micky5991 commented 5 years ago

The current situation is, that RageMP does not clean up plugins correctly. We are listening to those events, but if they do not get called, we are unable to trigger all IResource.OnStopAsync methods.

aviadmini commented 5 years ago

I didn't find any invocation of that method in library code

Micky5991 commented 5 years ago

Yeah, thats correct, but the method, that would invocate this event, is not even called in the first place. So implementing it would not fix that problem.

The RageMP Server needs to call this method:

https://github.com/AlternateLife/ragemp-c-sdk/blob/33bcc526c842d7834f272962059778981bb300be/src/plugin.cpp#L45-L51

But the log messages do not even appear we just included that method for future compatibility. But I could try to create a workaround for it.