Commit 1755d86d authored by Dan Melnic's avatar Dan Melnic Committed by Facebook Github Bot

Clear the zerocopy maps in AsyncSocket::failAllWrites if the fd_ has been closed

Summary: Clear the zerocopy maps in AsyncSocket::failAllWrites if the fd_ has been closed

Reviewed By: djwatson

Differential Revision: D10347608

fbshipit-source-id: a60d0450b13d4989d6849ca4cbe1057ecb6b92dd
parent a1f71d0b
...@@ -2782,6 +2782,11 @@ void AsyncSocket::doClose() { ...@@ -2782,6 +2782,11 @@ void AsyncSocket::doClose() {
::close(fd_); ::close(fd_);
} }
fd_ = -1; fd_ = -1;
// we also want to clear the zerocopy maps
// if the fd has been closed
idZeroCopyBufPtrMap_.clear();
idZeroCopyBufInfoMap_.clear();
} }
std::ostream& operator<<( std::ostream& operator<<(
......
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