mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-19 11:15:50 +00:00
fix: make session::subscriptions_ a weak_ptr
This commit is contained in:
@@ -172,7 +172,7 @@ class session : public std::enable_shared_from_this<session>
|
||||
std::string response_;
|
||||
|
||||
std::shared_ptr<BackendInterface> backend_;
|
||||
std::shared_ptr<SubscriptionManager> subscriptions_;
|
||||
std::weak_ptr<SubscriptionManager> subscriptions_;
|
||||
std::shared_ptr<ETLLoadBalancer> balancer_;
|
||||
|
||||
public:
|
||||
@@ -295,10 +295,13 @@ private:
|
||||
BOOST_LOG_TRIVIAL(debug) << " received request : " << request;
|
||||
try
|
||||
{
|
||||
if (subscriptions_.expired())
|
||||
return;
|
||||
|
||||
response = buildResponse(
|
||||
request,
|
||||
backend_,
|
||||
subscriptions_,
|
||||
subscriptions_.lock(),
|
||||
balancer_,
|
||||
shared_from_this());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user