Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pleroma
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Alex Gleason
pleroma
Commits
e94ba05e
Commit
e94ba05e
authored
4 years ago
by
rinpatch
Browse files
Options
Downloads
Patches
Plain Diff
Connection pool: Fix a possible infinite recursion if the pool is exhausted
parent
7738fbba
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/pleroma/gun/connection_pool/worker_supervisor.ex
+6
-8
6 additions, 8 deletions
lib/pleroma/gun/connection_pool/worker_supervisor.ex
with
6 additions
and
8 deletions
lib/pleroma/gun/connection_pool/worker_supervisor.ex
+
6
−
8
View file @
e94ba05e
...
...
@@ -14,16 +14,14 @@ def init(_opts) do
)
end
def
start_worker
(
opts
)
do
def
start_worker
(
opts
,
retry
\\
false
)
do
case
DynamicSupervisor
.
start_child
(
__MODULE__
,
{
Pleroma
.
Gun
.
ConnectionPool
.
Worker
,
opts
})
do
{
:error
,
:max_children
}
->
case
free_pool
()
do
:ok
->
start_worker
(
opts
)
:error
->
:telemetry
.
execute
([
:pleroma
,
:connection_pool
,
:provision_failure
],
%{
opts:
opts
})
{
:error
,
:pool_full
}
if
retry
or
free_pool
()
==
:error
do
:telemetry
.
execute
([
:pleroma
,
:connection_pool
,
:provision_failure
],
%{
opts:
opts
})
{
:error
,
:pool_full
}
else
start_worker
(
opts
,
true
)
end
res
->
...
...
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