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
3012486d
Commit
3012486d
authored
Oct 16, 2019
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix error handling in remote_group
parent
c525c605
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
libcaf_io/src/io/middleman.cpp
libcaf_io/src/io/middleman.cpp
+7
-7
No files found.
libcaf_io/src/io/middleman.cpp
View file @
3012486d
...
@@ -222,8 +222,7 @@ expected<group> middleman::remote_group(const std::string& group_identifier,
...
@@ -222,8 +222,7 @@ expected<group> middleman::remote_group(const std::string& group_identifier,
const
std
::
set
<
std
::
string
>&
)
mutable
{
const
std
::
set
<
std
::
string
>&
)
mutable
{
auto
hdl
=
actor_cast
<
actor
>
(
ptr
);
auto
hdl
=
actor_cast
<
actor
>
(
ptr
);
self
->
request
(
hdl
,
infinite
,
get_atom
::
value
,
group_identifier
)
self
->
request
(
hdl
,
infinite
,
get_atom
::
value
,
group_identifier
)
.
then
(
.
then
([
=
](
group
&
grp
)
mutable
{
rp
.
deliver
(
std
::
move
(
grp
));
});
[
=
](
group
&
result
)
mutable
{
rp
.
deliver
(
std
::
move
(
result
));
});
});
});
},
},
};
};
...
@@ -231,11 +230,12 @@ expected<group> middleman::remote_group(const std::string& group_identifier,
...
@@ -231,11 +230,12 @@ expected<group> middleman::remote_group(const std::string& group_identifier,
// Spawn the helper actor and wait for the result.
// Spawn the helper actor and wait for the result.
expected
<
group
>
result
{
sec
::
cannot_connect_to_node
};
expected
<
group
>
result
{
sec
::
cannot_connect_to_node
};
scoped_actor
self
{
system
(),
true
};
scoped_actor
self
{
system
(),
true
};
self
auto
worker
=
self
->
spawn
<
lazy_init
+
monitored
>
(
two_step_lookup
,
->
request
(
self
->
spawn
<
lazy_init
>
(
two_step_lookup
,
actor_handle
()),
infinite
,
actor_handle
());
get_atom
::
value
)
self
->
send
(
worker
,
get_atom
::
value
);
.
receive
([
&
](
group
&
grp
)
{
result
=
std
::
move
(
grp
);
},
self
->
receive
([
&
](
group
&
grp
)
{
result
=
std
::
move
(
grp
);
},
[
&
](
error
&
err
)
{
result
=
std
::
move
(
err
);
});
[
&
](
error
&
err
)
{
result
=
std
::
move
(
err
);
},
[
&
](
down_msg
&
dm
)
{
result
=
std
::
move
(
dm
.
reason
);
});
return
result
;
return
result
;
}
}
...
...
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