Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
babeld
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
babeld
Commits
bf635e48
Commit
bf635e48
authored
Jan 08, 2008
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reduce amount of jitter.
parent
3611150d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
network.c
network.c
+3
-0
No files found.
network.c
View file @
bf635e48
...
@@ -126,6 +126,7 @@ unsigned int
...
@@ -126,6 +126,7 @@ unsigned int
jitter
(
struct
network
*
net
)
jitter
(
struct
network
*
net
)
{
{
unsigned
interval
=
net
->
hello_interval
*
1000
;
unsigned
interval
=
net
->
hello_interval
*
1000
;
interval
=
MIN
(
interval
,
2000
);
return
(
interval
/
2
+
random
()
%
interval
)
/
4
;
return
(
interval
/
2
+
random
()
%
interval
)
/
4
;
}
}
...
@@ -135,6 +136,8 @@ update_jitter(struct network *net, int urgent)
...
@@ -135,6 +136,8 @@ update_jitter(struct network *net, int urgent)
unsigned
interval
=
net
->
hello_interval
*
1000
;
unsigned
interval
=
net
->
hello_interval
*
1000
;
if
(
urgent
)
if
(
urgent
)
interval
=
MIN
(
interval
,
100
);
interval
=
MIN
(
interval
,
100
);
else
interval
=
MIN
(
interval
,
4000
);
return
(
interval
/
2
+
random
()
%
interval
);
return
(
interval
/
2
+
random
()
%
interval
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment