diff --git a/src/cpp/ripple/AutoSocket.h b/src/cpp/ripple/AutoSocket.h index ccf82ab507..9f04d3b4e7 100644 --- a/src/cpp/ripple/AutoSocket.h +++ b/src/cpp/ripple/AutoSocket.h @@ -75,7 +75,7 @@ public: else if (mBuffer.empty()) { // must be plain mSecure = false; - cbFunc(error_code()); + mSocket->get_io_service().post(boost::bind(cbFunc, error_code())); } else { // autodetect