print better error when losing connection

This commit is contained in:
whyrusleeping
2020-09-09 15:19:54 -07:00
parent e58327d4ed
commit 09194aa613
+4 -1
View File
@@ -106,7 +106,10 @@ var mpoolStatsCmd = &cli.Command{
tick := time.Tick(time.Second)
for {
select {
case u := <-updates:
case u, ok := <-updates:
if !ok {
return fmt.Errorf("connection with lotus node broke")
}
switch u.Type {
case lapi.MpoolAdd:
tracker[u.Message.Cid()] = &msgInfo{