Commit da7d17d 1 parent 0ec1983 commit da7d17d Copy full SHA for da7d17d
File tree 1 file changed +3
-11
lines changed
src/Etcd.Microsoft.Extensions.Configuration/Client
1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -231,16 +231,14 @@ private void OnWatchCallback(WatchResponse response)
231
231
x . Kv . Value . ToStringUtf8 ( ) ) ) ) ;
232
232
}
233
233
234
- private Task StopWatchAsync ( long watchID )
235
- {
236
- return _client . Watch ( new WatchRequest
234
+ private Task StopWatchAsync ( long watchID ) =>
235
+ _client . WatchAsync ( new WatchRequest
237
236
{
238
237
CancelRequest = new WatchCancelRequest
239
238
{
240
239
WatchId = watchID
241
240
}
242
241
} , OnWatchCallback , GetMetadata ( ) ) ;
243
- }
244
242
245
243
private void StopWatchAll ( )
246
244
{
@@ -263,11 +261,5 @@ private void StopWatchAll()
263
261
}
264
262
265
263
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 ( ) ) ;
273
265
}
You can’t perform that action at this time.
0 commit comments