Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
duniter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
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
nodes
typescript
duniter
Commits
9ce00774
Unverified
Commit
9ce00774
authored
7 years ago
by
Éloïs
Browse files
Options
Downloads
Patches
Plain Diff
[fix] replace hardcoded max ws2p quota by constant
parent
fa52b6a3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!1222
Add startup scripts
,
!1220
Stable/ws2p v1.1 trymerge
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/modules/ws2p/lib/WS2PServer.ts
+1
-1
1 addition, 1 deletion
app/modules/ws2p/lib/WS2PServer.ts
with
1 addition
and
1 deletion
app/modules/ws2p/lib/WS2PServer.ts
+
1
−
1
View file @
9ce00774
...
...
@@ -139,7 +139,7 @@ export class WS2PServer extends events.EventEmitter {
async
removeExcessIncomingConnections
()
{
await
this
.
removeDuplicateConnections
()
const
ws2pPublicMax
=
(
this
.
server
.
conf
.
ws2p
&&
this
.
server
.
conf
.
ws2p
.
maxPublic
)
?
this
.
server
.
conf
.
ws2p
.
maxPublic
:
10
const
ws2pPublicMax
=
(
this
.
server
.
conf
.
ws2p
&&
this
.
server
.
conf
.
ws2p
.
maxPublic
)
?
this
.
server
.
conf
.
ws2p
.
maxPublic
:
WS2PConstants
.
MAX_LEVEL_2_PEERS
let
privilegedKeys
=
(
this
.
server
.
conf
.
ws2p
&&
this
.
server
.
conf
.
ws2p
.
privilegedNodes
)
?
this
.
server
.
conf
.
ws2p
.
privilegedNodes
:[]
while
(
this
.
countConnexions
()
>
ws2pPublicMax
)
{
await
this
.
removeLowPriorityConnection
(
privilegedKeys
)
...
...
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