From 26b71ab993387471996cd8c3e93bb5c44abb721c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Blin?= <sebastien.blin@savoirfairelinux.com> Date: Wed, 18 Aug 2021 16:35:09 -0400 Subject: [PATCH] proxyclient: do not play with stop when resubscribing At this point we do not care for the request. Subscribes are instantaneous, so the request will be terminated at this point. Changing the stop status can cause some push notifications to be dropped if coming at this moment. --- src/dht_proxy_client.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/dht_proxy_client.cpp b/src/dht_proxy_client.cpp index cceb64c8..f713d4b3 100644 --- a/src/dht_proxy_client.cpp +++ b/src/dht_proxy_client.cpp @@ -1265,11 +1265,7 @@ DhtProxyClient::resubscribe(const InfoHash& key, const size_t token, Listener& l logger_->d("[proxy:client] [resubscribe] [search %s]", key.to_c_str()); auto opstate = listener.opstate; - opstate->stop = true; - if (listener.request){ - listener.request.reset(); - } - opstate->stop = false; + listener.request.reset(); // This will update ok to false opstate->ok = true; restinio::http_request_header_t header; -- GitLab