From: Kyle Nekritz Date: Fri, 1 Sep 2017 16:13:58 +0000 (-0700) Subject: Deflake some AsyncSSLSocket tests. X-Git-Tag: v2017.09.04.00~2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=bb9a22375539730d9e6d46ddd2cb1f6da78a4120;hp=e540cbee6a5f7b9ee31886081dc6189d327ddbfd;p=folly.git Deflake some AsyncSSLSocket tests. Summary: Fulfilling starts destroying the evb in another thread which races with the socket closing on the evb. Reviewed By: siyengar, ngoyal Differential Revision: D5755271 fbshipit-source-id: ace37eee63e684c97ca0fe503293eee83514e0ac --- diff --git a/folly/io/async/test/AsyncSSLSocketTest2.cpp b/folly/io/async/test/AsyncSSLSocketTest2.cpp index ae9ef53f..c50b6a7d 100644 --- a/folly/io/async/test/AsyncSSLSocketTest2.cpp +++ b/folly/io/async/test/AsyncSSLSocketTest2.cpp @@ -206,13 +206,13 @@ class ConnectClient : public AsyncSocket::ConnectCallback { } void connectSuccess() noexcept override { - promise_.setValue(true); socket_.reset(); + promise_.setValue(true); } void connectErr(const AsyncSocketException& /* ex */) noexcept override { - promise_.setValue(false); socket_.reset(); + promise_.setValue(false); } void setCtx(std::shared_ptr ctx) {