|
@@ -17,6 +17,8 @@ import (
|
|
|
"github.com/sirupsen/logrus"
|
|
|
"golang.org/x/net/context"
|
|
|
"google.golang.org/grpc"
|
|
|
+ "google.golang.org/grpc/codes"
|
|
|
+ "google.golang.org/grpc/status"
|
|
|
)
|
|
|
|
|
|
// nodeRunner implements a manager for continuously running swarmkit node, restarting them with backoff delays if needed.
|
|
@@ -217,7 +219,10 @@ func (n *nodeRunner) watchClusterEvents(ctx context.Context, conn *grpc.ClientCo
|
|
|
msg, err := watch.Recv()
|
|
|
if err != nil {
|
|
|
// store watch is broken
|
|
|
- logrus.WithError(err).Error("failed to receive changes from store watch API")
|
|
|
+ errStatus, ok := status.FromError(err)
|
|
|
+ if !ok || errStatus.Code() != codes.Canceled {
|
|
|
+ logrus.WithError(err).Error("failed to receive changes from store watch API")
|
|
|
+ }
|
|
|
return
|
|
|
}
|
|
|
select {
|