Commit 7c4ac999 authored by Dan Melnic's avatar Dan Melnic Committed by Facebook GitHub Bot

TSAN fix for folly/io/test:shutdown_socket_set_test

Summary: TSAN fix for folly/io/test:shutdown_socket_set_test

Differential Revision: D24321155

fbshipit-source-id: 753a808c868da4c608c3ee95d16a3673d6f700b0
parent af60f10a
...@@ -94,7 +94,7 @@ int ShutdownSocketSet::close(NetworkSocket fd) { ...@@ -94,7 +94,7 @@ int ShutdownSocketSet::close(NetworkSocket fd) {
LOG(FATAL) << "Invalid prev state for fd " << fd << ": " LOG(FATAL) << "Invalid prev state for fd " << fd << ": "
<< int(prevState); << int(prevState);
} }
} while (!sref.compare_exchange_weak( } while (!sref.compare_exchange_strong(
prevState, newState, std::memory_order_relaxed)); prevState, newState, std::memory_order_relaxed));
return newState == FREE ? folly::closeNoInt(fd) : 0; return newState == FREE ? folly::closeNoInt(fd) : 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment