Commit f9f5da22 authored by Shai Szulanski's avatar Shai Szulanski Committed by Facebook GitHub Bot

Fix self-assignment in folly::coro::AsyncPipe

Reviewed By: yfeldblum

Differential Revision: D22843001

fbshipit-source-id: 55f48de90f16c53983ea94c8e1102c5b33e25195
parent 10d69890
......@@ -48,8 +48,10 @@ class AsyncPipe {
queue_ = std::move(pipe.queue_);
}
AsyncPipe& operator=(AsyncPipe&& pipe) {
std::move(*this).close();
queue_ = std::move(pipe.queue_);
if (this != &pipe) {
std::move(*this).close();
queue_ = std::move(pipe.queue_);
}
return *this;
}
......
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