We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1543f85 + a15242d commit bb03967Copy full SHA for bb03967
pkg/server/watch.go
@@ -131,14 +131,14 @@ func (w *watcher) Cancel(watchID int64, err error) {
131
reason = err.Error()
132
}
133
logrus.Debugf("WATCH CANCEL id=%d reason=%s", watchID, reason)
134
- err = w.server.Send(&etcdserverpb.WatchResponse{
+ serr := w.server.Send(&etcdserverpb.WatchResponse{
135
Header: &etcdserverpb.ResponseHeader{},
136
Canceled: true,
137
CancelReason: "watch closed",
138
WatchId: watchID,
139
})
140
- if err != nil {
141
- logrus.Errorf("WATCH Failed to send cancel response for watchID %d: %v", watchID, err)
+ if serr != nil && err != nil {
+ logrus.Errorf("WATCH Failed to send cancel response for watchID %d: %v", watchID, serr)
142
143
144
0 commit comments