Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
73a1e806
Commit
73a1e806
authored
1 month ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
ServerAccountManager: re-schedule request deletion
GitLab:
#1101
Change-Id: Ifaee9fe0a2b79716e00ccc1a12c8c78c348e80bf
parent
5ac7a9eb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/jamidht/server_account_manager.cpp
+8
-4
8 additions, 4 deletions
src/jamidht/server_account_manager.cpp
with
8 additions
and
4 deletions
src/jamidht/server_account_manager.cpp
+
8
−
4
View file @
73a1e806
...
...
@@ -283,10 +283,14 @@ ServerAccountManager::sendRequest(const std::shared_ptr<dht::http::Request>& req
void
ServerAccountManager
::
clearRequest
(
const
std
::
weak_ptr
<
dht
::
http
::
Request
>&
request
)
{
if
(
auto
req
=
request
.
lock
())
{
std
::
lock_guard
lock
(
requestLock_
);
requests_
.
erase
(
req
);
}
Manager
::
instance
().
ioContext
()
->
post
([
w
=
weak_from_this
(),
request
]
{
if
(
auto
this_
=
std
::
static_pointer_cast
<
ServerAccountManager
>
(
w
.
lock
()))
{
if
(
auto
req
=
request
.
lock
())
{
std
::
lock_guard
lock
(
this_
->
requestLock_
);
this_
->
requests_
.
erase
(
req
);
}
}
});
}
void
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment