Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ func NewClient(dbDir string, cfg *ClientConfig) (*Client, func(), error) {

cleanup := func() {
swapServerClient.stop()
store.Close()
}

return client, cleanup, nil
Expand Down
4 changes: 2 additions & 2 deletions loopd/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ func (d *Daemon) initialize(createDefaultMacaroonFile bool) error {
// The client and the macaroon service are the only things we
// started yet, so if we clean that up now, nothing else needs
// to be shut down at this point.
if err := d.stopMacaroonService(); err != nil {
if err := d.StopMacaroonService(); err != nil {
log.Errorf("Error shutting down macaroon service: %v",
err)
}
Expand Down Expand Up @@ -520,7 +520,7 @@ func (d *Daemon) stop() {
d.restCtxCancel()
}

err := d.macaroonService.Close()
err := d.StopMacaroonService()
if err != nil {
log.Errorf("Error stopping macaroon service: %v", err)
}
Expand Down
4 changes: 2 additions & 2 deletions loopd/macaroons.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ func (d *Daemon) startMacaroonService(createDefaultMacaroonFile bool) error {
return nil
}

// stopMacaroonService closes the macaroon database.
func (d *Daemon) stopMacaroonService() error {
// StopMacaroonService closes the macaroon database.
func (d *Daemon) StopMacaroonService() error {
var shutdownErr error
if err := d.macaroonService.Close(); err != nil {
log.Errorf("Error closing macaroon service: %v", err)
Expand Down
2 changes: 2 additions & 0 deletions release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@ This file tracks release notes for the loop client.

#### Bug Fixes

* Close local databases when loopd daemon is stopped programmatically.

#### Maintenance