print better error when losing connection
This commit is contained in:
parent
e58327d4ed
commit
09194aa613
@ -106,7 +106,10 @@ var mpoolStatsCmd = &cli.Command{
|
|||||||
tick := time.Tick(time.Second)
|
tick := time.Tick(time.Second)
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case u := <-updates:
|
case u, ok := <-updates:
|
||||||
|
if !ok {
|
||||||
|
return fmt.Errorf("connection with lotus node broke")
|
||||||
|
}
|
||||||
switch u.Type {
|
switch u.Type {
|
||||||
case lapi.MpoolAdd:
|
case lapi.MpoolAdd:
|
||||||
tracker[u.Message.Cid()] = &msgInfo{
|
tracker[u.Message.Cid()] = &msgInfo{
|
||||||
|
Loading…
Reference in New Issue
Block a user