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
3c2305e9
Commit
3c2305e9
authored
Oct 06, 2017
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Generate exit/down message on node failure
parent
dec30982
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
libcaf_io/src/basp_broker.cpp
libcaf_io/src/basp_broker.cpp
+6
-1
No files found.
libcaf_io/src/basp_broker.cpp
View file @
3c2305e9
...
@@ -146,9 +146,11 @@ void basp_broker_state::finalize_handshake(const node_id& nid, actor_id aid,
...
@@ -146,9 +146,11 @@ void basp_broker_state::finalize_handshake(const node_id& nid, actor_id aid,
void
basp_broker_state
::
purge_state
(
const
node_id
&
nid
)
{
void
basp_broker_state
::
purge_state
(
const
node_id
&
nid
)
{
CAF_LOG_TRACE
(
CAF_ARG
(
nid
));
CAF_LOG_TRACE
(
CAF_ARG
(
nid
));
// We can only be sure a node is down when we had a direct connection.
auto
hdl
=
instance
.
tbl
().
lookup_direct
(
nid
);
auto
hdl
=
instance
.
tbl
().
lookup_direct
(
nid
);
if
(
hdl
==
invalid_connection_handle
)
if
(
hdl
==
invalid_connection_handle
)
return
;
return
;
// Cleanup state in case we lost connection during handshake.
auto
i
=
ctx
.
find
(
hdl
);
auto
i
=
ctx
.
find
(
hdl
);
if
(
i
!=
ctx
.
end
())
{
if
(
i
!=
ctx
.
end
())
{
auto
&
ref
=
i
->
second
;
auto
&
ref
=
i
->
second
;
...
@@ -158,6 +160,9 @@ void basp_broker_state::purge_state(const node_id& nid) {
...
@@ -158,6 +160,9 @@ void basp_broker_state::purge_state(const node_id& nid) {
}
}
ctx
.
erase
(
i
);
ctx
.
erase
(
i
);
}
}
// Destroy all proxies of the lost node.
namespace_
.
erase
(
nid
);
// Close network connection.
self
->
close
(
hdl
);
self
->
close
(
hdl
);
}
}
...
@@ -179,7 +184,7 @@ void basp_broker_state::proxy_announced(const node_id& nid, actor_id aid) {
...
@@ -179,7 +184,7 @@ void basp_broker_state::proxy_announced(const node_id& nid, actor_id aid) {
instance
.
tbl
().
flush
(
*
path
);
instance
.
tbl
().
flush
(
*
path
);
};
};
auto
ptr
=
actor_cast
<
strong_actor_ptr
>
(
entry
);
auto
ptr
=
actor_cast
<
strong_actor_ptr
>
(
entry
);
if
(
!
ptr
)
{
if
(
ptr
==
null
ptr
)
{
CAF_LOG_DEBUG
(
"kill proxy immediately"
);
CAF_LOG_DEBUG
(
"kill proxy immediately"
);
// kill immediately if actor has already terminated
// kill immediately if actor has already terminated
send_kill_proxy_instance
(
exit_reason
::
unknown
);
send_kill_proxy_instance
(
exit_reason
::
unknown
);
...
...
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