Commit 5fba441a authored by Ian Roddis's avatar Ian Roddis

Adding check for peer before enqueuing write

parent f5b780fa
......@@ -357,6 +357,9 @@ Transport::handleWriteQueue() {
{
Guard guard(toWriteLock);
// don't enqueue anything to write if the peer has already
// disconnected. Security and memory leaks occur if we do.
if (peers.find(fd) == peers.end()) continue;
toWrite[fd].push_back(std::move(*write));
}
......
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