Browse Source

v3rpc: do not panic on user error for watch

Xiang Li 9 years ago
parent
commit
13a4056327
1 changed files with 4 additions and 2 deletions
  1. 4 2
      etcdserver/api/v3rpc/watch.go

+ 4 - 2
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
 		}
 	}
 }