[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - net/Socket.hpp

Jan Holesovsky kendy at collabora.com
Wed Apr 5 09:37:01 UTC 2017


 net/Socket.hpp |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 3ca488320eacbc4810658ddfdad0d356fd904be8
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Wed Apr 5 11:35:59 2017 +0200

    The other isCorrectThread() should be active only in the debug build too.
    
    Change-Id: Ieadb7e14f70752f5cfb2fd9ee569b56fb39d528b

diff --git a/net/Socket.hpp b/net/Socket.hpp
index 9e06a040..71000117 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -294,12 +294,16 @@ public:
     /// Are we running in either shutdown, or the polling thread.
     bool isCorrectThread() const
     {
+#if ENABLE_DEBUG
         if (std::this_thread::get_id() != _owner)
             LOG_WRN("Incorrect thread affinity for " << _name << ". Expected: 0x" << std::hex <<
                     _owner << " (" << std::dec << Util::getThreadId() << ") but called from 0x" <<
                     std::hex << std::this_thread::get_id() << std::dec << ", stop: " << _stop);
 
         return _stop || std::this_thread::get_id() == _owner;
+#else
+        return true;
+#endif
     }
 
     /// Poll the sockets for available data to read or buffer to write.


More information about the Libreoffice-commits mailing list