diff options
| -rw-r--r-- | net/Socket.hpp | 7 | ||||
| -rw-r--r-- | wsd/AdminModel.hpp | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/net/Socket.hpp b/net/Socket.hpp index e8e922774..74caa5aa7 100644 --- a/net/Socket.hpp +++ b/net/Socket.hpp @@ -221,11 +221,11 @@ protected: { setNoDelay(); _sendBufferSize = DefaultSendBufferSize; -#if ENABLE_DEBUG _owner = std::this_thread::get_id(); LOG_DBG("#" << _fd << " Thread affinity set to 0x" << std::hex << _owner << "." << std::dec); +#if ENABLE_DEBUG const int oldSize = getSocketBufferSize(); setSocketBufferSize(0); LOG_TRC("#" << _fd << ": Buffer size: " << getSendBufferSize() << @@ -236,7 +236,8 @@ protected: private: const int _fd; int _sendBufferSize; - // always enabled to avoid ABI change in debug mode ... + + /// We check the owner even in the release builds, needs to be always correct. std::thread::id _owner; }; @@ -531,11 +532,9 @@ private: Util::setThreadName(_name); LOG_INF("Starting polling thread [" << _name << "]."); -#if ENABLE_DEBUG _owner = std::this_thread::get_id(); LOG_DBG("Thread affinity of " << _name << " set to 0x" << std::hex << _owner << "." << std::dec); -#endif // Invoke the virtual implementation. pollingThread(); diff --git a/wsd/AdminModel.hpp b/wsd/AdminModel.hpp index 9a7ee8c9b..80f0437b0 100644 --- a/wsd/AdminModel.hpp +++ b/wsd/AdminModel.hpp @@ -208,7 +208,7 @@ private: std::list<unsigned> _cpuStats; unsigned _cpuStatsSize = 100; - // always enabled to avoid ABI change in debug mode ... + /// We check the owner even in the release builds, needs to be always correct. std::thread::id _owner; }; |
