From 18036d2b0182fdcd0ee14a3f2c54e22e661317a9 Mon Sep 17 00:00:00 2001 From: Peter Thorson Date: Tue, 5 Nov 2013 07:52:31 -0600 Subject: [PATCH] sets mutex to mutable to allow use in const accessors references #292 --- changelog.md | 2 ++ websocketpp/endpoint.hpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index c7ef8e8f41..51886ddc0f 100644 --- a/changelog.md +++ b/changelog.md @@ -12,6 +12,8 @@ HEAD buffer sizes based on profiling, caching of handler binding for async reads/writes, non-malloc allocators for read/write handlers, disabling of a number of questionably useful range sanity checks in tight inner loops. +- Bug: Fix issue with const endpoint accessors (such as `get_user_agent`) not + compiling due to non-const mutex use. #292 Thank you logofive for reporting. - Bug: Fix handler allocation crash with multithreaded io_service. - Bug: Fixes incorrect whitespace handling in header parsing. #301 Thank you Wolfram Schroers for reporting diff --git a/websocketpp/endpoint.hpp b/websocketpp/endpoint.hpp index d0134c0e56..7fb3d8d894 100644 --- a/websocketpp/endpoint.hpp +++ b/websocketpp/endpoint.hpp @@ -504,7 +504,7 @@ private: bool const m_is_server; // endpoint state - mutex_type m_mutex; + mutable mutex_type m_mutex; }; } // namespace websocketpp