From: Hans Fugal Date: Wed, 22 Oct 2014 17:14:45 +0000 (-0700) Subject: fix Future::value() X-Git-Tag: v0.22.0~246 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f85b2abed522203ff8ace448707fd0e53074815c;p=folly.git fix Future::value() Summary: I'm still a little mystified how one makes a Future (I tried to make one explicitly in a test and failed), but this is clearly the bug @reedriley sees in https://phabricator.fb.com/D1620805#21 Test Plan: fbconfig titan/cachius/test fbmake Reviewed By: reedriley@fb.com Subscribers: trunkagent, net-systems@, fugalh, exa, njormrod, reedriley, folly-diffs@ FB internal diff: D1630378 Blame Revision: D1620805 --- diff --git a/folly/wangle/Future-inl.h b/folly/wangle/Future-inl.h index 5615c7d5..f462189c 100644 --- a/folly/wangle/Future-inl.h +++ b/folly/wangle/Future-inl.h @@ -179,7 +179,7 @@ template typename std::add_lvalue_reference::type Future::value() const { throwIfInvalid(); - return core_->value(); + return core_->getTry().value(); } template