diff --git a/api/client.go b/api/client.go index ecd0cda744a26ab5299bd0229b3ec55b0d390f4e..fa635f2e24c3255a39c0f3216bfbd681037341e8 100644 --- a/api/client.go +++ b/api/client.go @@ -187,8 +187,6 @@ func OpenClient(storageDir string, password []byte, parameters params.Network) ( parameters: parameters, } - c.runner.Add(c.storage.Partition().ClearMessages()) - return c, nil } @@ -410,6 +408,9 @@ func (c *Client) StartNetworkFollower(timeout time.Duration) (<-chan interfaces. c.runner = stoppable.NewMulti(followerStoppableName) } + jww.INFO.Printf("Adding partition cleaner") + c.runner.Add(c.storage.Partition().ClearMessages()) + err = c.status.toStarting() if err != nil { return nil, errors.WithMessage(err, "Failed to Start the Network Follower") diff --git a/storage/partition/store.go b/storage/partition/store.go index 30cf66f749d12d495f25403c5a6263df232134ca..7dfaf405bf35b0fb64743bd9a6820360c6f3642c 100644 --- a/storage/partition/store.go +++ b/storage/partition/store.go @@ -9,6 +9,7 @@ package partition import ( "encoding/binary" + jww "github.com/spf13/jwalterweatherman" "gitlab.com/elixxir/client/interfaces/message" "gitlab.com/elixxir/client/stoppable" "gitlab.com/elixxir/client/storage/versioned" @@ -67,6 +68,7 @@ func (s *Store) ClearMessages() stoppable.Stoppable { for { select { case <-stop.Quit(): + jww.INFO.Printf("Received stop signal in clear messages") stop.ToStopped() t.Stop() return