[Libreoffice-commits] online.git: net/Socket.cpp wsd/LOOLWSD.cpp
Michael Meeks
michael.meeks at collabora.com
Tue May 9 12:02:54 UTC 2017
net/Socket.cpp | 4 ++++
wsd/LOOLWSD.cpp | 1 -
2 files changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 495d6da532d7ec9f05713ed81bb6e12fd894c41f
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Mon May 8 15:23:49 2017 +0100
Reset ownership before executing the socket move.
Change-Id: I98532e59ef9c78a6cc1eb25a5a8535c4e2d9b15d
diff --git a/net/Socket.cpp b/net/Socket.cpp
index 5faeced7..652c7568 100644
--- a/net/Socket.cpp
+++ b/net/Socket.cpp
@@ -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;
}
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index a6771996..ce983651 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -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);
});
}
More information about the Libreoffice-commits
mailing list