diff --git a/src/cpp/ripple/RPCHandler.cpp b/src/cpp/ripple/RPCHandler.cpp index f9c0902848..3ce0749c44 100644 --- a/src/cpp/ripple/RPCHandler.cpp +++ b/src/cpp/ripple/RPCHandler.cpp @@ -2516,7 +2516,8 @@ Json::Value RPCHandler::doSubscribe(Json::Value jvRequest) { cLog(lsDEBUG) << boost::str(boost::format("doSubscribe: building: %s") % strUrl); - ispSub = mNetOps->addRpcSub(strUrl, boost::make_shared(strUrl, strUsername, strPassword)); + RPCSub::pointer rspSub = boost::make_shared(strUrl, strUsername, strPassword); + ispSub = mNetOps->addRpcSub(strUrl, boost::shared_polymorphic_downcast(rspSub)); } else {