mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 12:28:42 +00:00
dhtproxy: fix listener destruction thus, restart
This commit is contained in:
1 parent
460205eb78
commit
5c0a8986a7
3 files changed
+15
-11
No files matched your search
@@ -1101,7 +1101,7 @@ DhtProxyClient::restartListeners()
|
||||
auto& listener = l.second;
|
||||
if (auto opstate = listener.opstate)
|
||||
opstate->stop = true;
|
||||
listener.request->end();
|
||||
listener.request.reset();
|
||||
}
|
||||
}
|
||||
for (auto& search: searches_) {
|
||||
@@ -1222,8 +1222,8 @@ DhtProxyClient::resubscribe(const InfoHash& key, const size_t token, Listener& l
|
||||
|
||||
auto opstate = listener.opstate;
|
||||
opstate->stop = true;
|
||||
if (listener.request) {
|
||||
listener.request->end();
|
||||
if (listener.request){
|
||||
listener.request.reset();
|
||||
}
|
||||
opstate.reset(new OperationState());
|
||||
|
||||
|
||||
Reference in new issue
Block a user