Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
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
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
5f4880b7
Commit
5f4880b7
authored
Aug 13, 2018
by
Joseph Noir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix repeated message loss
parent
8eea7aa0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
libcaf_io/caf/policy/newb_reliability.hpp
libcaf_io/caf/policy/newb_reliability.hpp
+4
-4
No files found.
libcaf_io/caf/policy/newb_reliability.hpp
View file @
5f4880b7
...
...
@@ -55,7 +55,8 @@ struct reliability {
using
message_type
=
typename
Next
::
message_type
;
using
result_type
=
typename
Next
::
result_type
;
id_type
id_write
=
0
;
std
::
chrono
::
milliseconds
retransmit_to
=
std
::
chrono
::
milliseconds
(
200
);
// TODO: Make this configurable.
std
::
chrono
::
milliseconds
retransmit_to
=
std
::
chrono
::
milliseconds
(
100
);
io
::
network
::
newb
<
message_type
>*
parent
;
Next
next
;
std
::
unordered_map
<
id_type
,
io
::
network
::
byte_buffer
>
unacked
;
...
...
@@ -92,16 +93,15 @@ struct reliability {
error
timeout
(
atom_value
atm
,
uint32_t
id
)
{
if
(
atm
==
reliability_atom
::
value
)
{
id_type
retransmit_id
=
static_cast
<
id_type
>
(
id
);
error
err
=
none
;
if
(
unacked
.
count
(
retransmit_id
)
>
0
)
{
// Retransmit the packet.
auto
&
packet
=
unacked
[
retransmit_id
];
auto
&
buf
=
parent
->
wr_buf
();
buf
.
insert
(
buf
.
begin
(),
packet
.
begin
(),
packet
.
end
());
parent
->
flush
();
//parent->set_timeout(retransmit_to, reliability_atom::value, id_write
);
parent
->
set_timeout
(
retransmit_to
,
reliability_atom
::
value
,
retransmit_id
);
}
return
err
;
return
none
;
}
return
next
.
timeout
(
atm
,
id
);
}
...
...
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