Fixed how leaseid can be fetched.

This commit is contained in:
arches 2016-07-13 08:30:34 -04:00
parent d9b18e6b7e
commit 16936603b5
1 changed files with 1 additions and 1 deletions

View File

@ -306,7 +306,7 @@ Moreover, user can attached the lease to a key(s) by indicating the lease id in
```c++ ```c++
etcd::Client etcd("http://127.0.0.1:4001"); etcd::Client etcd("http://127.0.0.1:4001");
int64_t leasid = etcd.leasegrant(60); int64_t leasid = etcd.leasegrant(60).value().lease();
etcd.set("/test/key2", "bar", leaseid); etcd.set("/test/key2", "bar", leaseid);
``` ```