From 2b380c96a5039524a7c54b4127a6bc958858deb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Wed, 10 Mar 2021 00:47:52 +0100 Subject: [PATCH] Exit from the kvlog goroutine when closing --- lib/backupds/log.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/backupds/log.go b/lib/backupds/log.go index 99b7b7c95..6820c8324 100644 --- a/lib/backupds/log.go +++ b/lib/backupds/log.go @@ -83,6 +83,7 @@ func (d *Datastore) startLog(logdir string) error { if err := l.Close(); err != nil { log.Errorw("failed to close log", "error", err) } + return } } }() @@ -193,7 +194,7 @@ func (l *logfile) writeLogHead(logname string, ds datastore.Batching) error { return xerrors.Errorf("writing loghead to the datastore: %w", err) } - log.Infow("now log head", "loghead", string(lval)) + log.Infow("new log head", "loghead", string(lval)) return nil }