diff --git a/websocketpp/endpoint.hpp b/websocketpp/endpoint.hpp index ae1f63f594..a70175a6a7 100644 --- a/websocketpp/endpoint.hpp +++ b/websocketpp/endpoint.hpp @@ -304,7 +304,14 @@ public: */ connection_ptr get_con_from_hdl(connection_hdl hdl, lib::error_code & ec) { scoped_lock_type lock(m_mutex); +/** @todo This wont build on windows with null as the second template argument. + I tried to look at the boost docs for this and cound not find why the second param is here. + Cleanup ifdefs when verified this builds on other systems. */ +#ifdef WIN32 + connection_ptr con = lib::static_pointer_cast( +#else connection_ptr con = lib::static_pointer_cast( +#endif hdl.lock()); if (!con) { ec = error::make_error_code(error::bad_connection);