From caccf8e5e6ebd7210c50bd8959c3d22624c82ae2 Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Sun, 3 Jul 2016 08:57:48 -0700 Subject: [PATCH] v3rpc: do not panic on user error for watch --- etcdserver/api/v3rpc/watch.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/etcdserver/api/v3rpc/watch.go b/etcdserver/api/v3rpc/watch.go index fc4eb8d55..c52455403 100644 --- a/etcdserver/api/v3rpc/watch.go +++ b/etcdserver/api/v3rpc/watch.go @@ -199,9 +199,11 @@ func (sws *serverWatchStream) recvLoop() error { sws.mu.Unlock() } } - // TODO: do we need to return error back to client? default: - panic("not implemented") + // we probably should not shutdown the entire stream when + // receive an valid command. + // so just do nothing instead. + continue } } }