Commit ee6d211e authored by ale's avatar ale

Improve error reporting for the gossip protocol

parent 461473ac
......@@ -3,6 +3,7 @@ package node
import (
"context"
"errors"
"fmt"
"log"
"net"
"sync"
......@@ -118,7 +119,7 @@ func (m *statusManager) propagateStatus(ctx context.Context) error {
target := endpoint.Addrs[0]
conn, err := m.conns.Get(ctx, target)
if err != nil {
return err
return fmt.Errorf("connect: %s: %v", target, err)
}
client := pb.NewGossipServiceClient(conn)
resp, err := client.Exchange(ctx, &pb.ExchangeRequest{
......@@ -126,7 +127,7 @@ func (m *statusManager) propagateStatus(ctx context.Context) error {
})
if err != nil {
m.conns.Drop(target, conn)
return err
return fmt.Errorf("Exchange: %s: %v", target, err)
}
// Merge the node info provided in the response.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment