ThePrimeagen / harpoon

MIT License
6.83k stars 366 forks source link

fix #565: setup data after config loaded #572

Open rndev-io opened 5 months ago

akyrey commented 5 months ago

@rusnasonov thank you for the PR.

What about leaving the data initialization and sync_on_change function also inside Harpoon::new() and edit Harpoon::setup() like you did but with sync_on_change(self) moved right before the final return?

rndev-io commented 5 months ago

What about leaving the data initialization and sync_on_change function also inside Harpoon::new()

It's creates additional empty data file with default key, which will never be used. If it's ok - why not.

but with sync_on_change(self) moved right before the final return?

Ok

maxrzaw commented 4 months ago

This also fixes #577