From 13a40563272ee7307b61e4725084ff32cc8f0346 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 d6f48cfcd..bb98ea390 100644 --- a/etcdserver/api/v3rpc/watch.go +++ b/etcdserver/api/v3rpc/watch.go @@ -210,9 +210,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 } } }