chore: log when an invalid watch request is received
As protobuf doesn't have required field, user may send an empty WatchRequest by mistake. Currently, etcd will ignore the invalid request and keep the stream opening. If we don't reject the invalid request by closing the stream, it would be better to leave a log there. This commit also fixes a typo in the comment. Signed-off-by: spacewander <spacewanderlzx@gmail.com>
This commit is contained in:
@ -346,8 +346,9 @@ func (sws *serverWatchStream) recvLoop() error {
|
||||
}
|
||||
default:
|
||||
// we probably should not shutdown the entire stream when
|
||||
// receive an valid command.
|
||||
// receive an invalid command.
|
||||
// so just do nothing instead.
|
||||
sws.lg.Warn("invalid watch request received in gRPC stream")
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user