Skip to content

Fix error when disabling the extension

Thomas requested to merge github/fork/rastersoft/fix_remove_source into master

Created by: rastersoft

When the extension is disabled, the log shows an error:

Source ID XXXXX was not found when attempting to remove it

This is because that is the ID from a timeout, but when the extension is disabled, that timeout has already run and the source has been removed.

This MR fixes this error by setting to zero the ID after the timeout has been executed, and checking its value in the destroy() method. This ensures that the source is removed if the extension is enabled and disabled very quickly, while avoiding removing it when it doesn't exist anymore.

Merge request reports