File tree Expand file tree Collapse file tree
src/Etcd.Microsoft.Extensions.Configuration/Client Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -231,16 +231,14 @@ private void OnWatchCallback(WatchResponse response)
231231 x . Kv . Value . ToStringUtf8 ( ) ) ) ) ;
232232 }
233233
234- private Task StopWatchAsync ( long watchID )
235- {
236- return _client . Watch ( new WatchRequest
234+ private Task StopWatchAsync ( long watchID ) =>
235+ _client . WatchAsync ( new WatchRequest
237236 {
238237 CancelRequest = new WatchCancelRequest
239238 {
240239 WatchId = watchID
241240 }
242241 } , OnWatchCallback , GetMetadata ( ) ) ;
243- }
244242
245243 private void StopWatchAll ( )
246244 {
@@ -263,11 +261,5 @@ private void StopWatchAll()
263261 }
264262
265263 private void Watch ( string key ) =>
266- _client . Watch ( new WatchRequest
267- {
268- CreateRequest = new WatchCreateRequest
269- {
270- Key = ByteString . CopyFromUtf8 ( key )
271- }
272- } , OnWatchCallback , GetMetadata ( ) ) ;
264+ _client . Watch ( key , OnWatchCallback , GetMetadata ( ) ) ;
273265}
You can’t perform that action at this time.
0 commit comments