If an async operation completes a server round trip before the caller
gets to the next line (a rare circumstance), the promise meant to
deliver the operation will be freed before get_future is called,
leading to a potential segfault. This change calls get_future before
sending the operation to the ZooKeeper C library.
If an async operation completes a server round trip before the caller gets to the next line (a rare circumstance), the
promise
meant to deliver the operation will be freed beforeget_future
is called, leading to a potential segfault. This change callsget_future
before sending the operation to the ZooKeeper C library.