dassjosh / Oxide.Ext.Discord

Discord extension and integration
https://umod.org/extensions/discord
MIT License
4 stars 10 forks source link

Bugfix: Only close the socket if it's non-null #3

Closed bakatz closed 3 months ago

bakatz commented 6 months ago

Seeing this extension randomly die every few months for some reason. When I reload plugins that depend on it whenever this happens, I get a null pointer in socket disconnect much like this user: https://umod.org/community/discord-chat/48587-error-when-trying-to-load-plugin?page=1

There's no logging or tests so it's hard to tell what's going on, so for now I've added a nullsafe call to at least allow this Disconnect method to complete without throwing an exception.

dassjosh commented 3 months ago

This has been fixed in version 3.0.0.