improve startup
bug fix
This commit is contained in:
parent
53778a3e4e
commit
f2d9d1a486
1 changed files with 6 additions and 2 deletions
|
@ -326,20 +326,20 @@ func (s *Sync) setChannelTerminationStatus(e *error) {
|
|||
}
|
||||
|
||||
func (s *Sync) waitForDaemonStart() error {
|
||||
|
||||
for {
|
||||
select {
|
||||
case <-s.grp.Ch():
|
||||
return errors.Err("interrupted during daemon startup")
|
||||
default:
|
||||
s, err := s.daemon.Status()
|
||||
if err == nil && s.StartupStatus.Wallet {
|
||||
if err == nil && s.StartupStatus.Wallet && s.StartupStatus.FileManager {
|
||||
return nil
|
||||
}
|
||||
time.Sleep(5 * time.Second)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (s *Sync) stopAndUploadWallet(e *error) {
|
||||
log.Printf("Stopping daemon")
|
||||
shutdownErr := stopDaemonViaSystemd()
|
||||
|
@ -446,6 +446,10 @@ func (s *Sync) doSync() error {
|
|||
}
|
||||
if hasDupes {
|
||||
SendInfoToSlack("Channel had dupes and was fixed!")
|
||||
err = s.waitForNewBlock()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
claims, err = s.daemon.ClaimListMine()
|
||||
if err != nil {
|
||||
return errors.Prefix("cannot list claims: ", err)
|
||||
|
|
Loading…
Reference in a new issue