Skip to content

Barks don't clean up on disconnect #4

@Anaerin

Description

@Anaerin

Currently, there's no way for plugins to clean themselves up when they're no longer in use/relevant. This wasn't a problem previously, as plugins were entirely reactionary. But Barks have the option to call themselves with an interval, and when the underlying object is detached to be cleaned up, this interval both keeps it loaded, and keeps trying to run.

At the moment, a try {} catch block eats the error, but it doesn't get rid of the interval, so each time a reconnect happens, you get an extra orphaned bark timer for each bark that was active at the time.

I need to add functionality for plugins to tear down active timers, and to activate that on a disconnect. JavaScript doesn't have a dispose() type method, it seems, so I'm going to have to take care of this myself.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions