test lbrycrd connection before sending
This commit is contained in:
parent
68c8e4c3ea
commit
ad4f7c530c
2 changed files with 7 additions and 1 deletions
|
@ -64,6 +64,12 @@ func New(lbrycrdURL string) (*Client, error) {
|
|||
return nil, errors.Wrap(err, 0)
|
||||
}
|
||||
|
||||
// make sure lbrycrd is running and responsive
|
||||
_, err = client.GetInfo()
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, 0)
|
||||
}
|
||||
|
||||
return &Client{client}, nil
|
||||
}
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ func (s *Sync) initDaemon() {
|
|||
if err == nil {
|
||||
break
|
||||
}
|
||||
time.Sleep(2 * time.Second)
|
||||
time.Sleep(5 * time.Second)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue