seed-hypermedia / mintter

Mintter: an app for knowledge communities. Powered by the Hypermedia protocol.
https://mintter.com
Apache License 2.0
156 stars 10 forks source link

[feat] Some improvements and fixes for lndhub client #612

Open burdiyan opened 2 years ago

burdiyan commented 2 years ago

I just realized that this PR from @juligasa breaks graceful shutdown of the daemon: https://github.com/mintterteam/mintter/pull/525. We'll need to fix those panics and leaking goroutines (the ones created in the constructors). Those need to be able to stop gracefully without panicking.

Also, as an additional enhancement, the package lndhub used to be a generic API client for an lndhub server. Would be great to keep it this way, and move all of our custom lndhub related business logic out of it.

juligasa commented 2 years ago

@burdiyan How did you test the graceful shutdown? when I was doing tests with ctrl^C, the command line said:

^C2022-09-05T16:08:49.306+0200  INFO    mintter/daemon  daemon/daemon.go:171    GracefulShutdownStarted
2022-09-05T16:08:49.306+0200    DEBUG   mintter/daemon  daemon/daemon.go:172    Press ctrl+c again to force quit, but it's better to wait :)
2022-09-05T16:08:49.307+0200    DEBUG   mintter/syncing syncing/syncing.go:148  SyncingServiceFinished  {"error": "context canceled"}
2022-09-05T16:08:49.309+0200    DEBUG   autorelay   autorelay/relay_finder.go:729   stopping relay finder
2022-09-05T16:08:49.315+0200    DEBUG   mintter/network mttnet/mttnet.go:219    P2PNodeFinished

which looks fine to me. Or you mean shutting down just at the beginning?

burdiyan commented 2 years ago

Yeah, I noticed the errors when shutting down without an account.

juligasa commented 2 years ago

The graceful shutdown problem should have been fixed in https://github.com/mintterteam/mintter/commit/9f7f28ef59fd6333529233212c15038063ea9ff2

GaboHBeaumont commented 1 year ago

should we close this issue? @juligasa @burdiyan

burdiyan commented 1 year ago

No. But I'm lowering the priority, because the most important thing is fixed.