Reset ownership before executing the socket move.
Change-Id: I98532e59ef9c78a6cc1eb25a5a8535c4e2d9b15d
This commit is contained in:
parent
4e8a8d6aad
commit
495d6da532
2 changed files with 4 additions and 1 deletions
|
@ -128,7 +128,11 @@ void SocketDisposition::execute()
|
|||
// We should have hard ownership of this socket.
|
||||
assert(_socket->getThreadOwner() == std::this_thread::get_id());
|
||||
if (_socketMove)
|
||||
{
|
||||
// Drop pretentions of ownership before _socketMove.
|
||||
_socket->setThreadOwner(std::thread::id(0));
|
||||
_socketMove(_socket);
|
||||
}
|
||||
_socketMove = nullptr;
|
||||
}
|
||||
|
||||
|
|
|
@ -1485,7 +1485,6 @@ private:
|
|||
// until we attach the childProcess (with this socket)
|
||||
// to a docBroker, which will do the polling.
|
||||
disposition.setMove([child](const std::shared_ptr<Socket> &){
|
||||
// Drop pretentions of ownership before adding to the list.
|
||||
addNewChild(child);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue