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
1db03f86
Commit
1db03f86
authored
Sep 17, 2019
by
Jakob Otto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing error handling
parent
7fbd231a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
libcaf_net/caf/net/transport_worker_dispatcher.hpp
libcaf_net/caf/net/transport_worker_dispatcher.hpp
+4
-2
libcaf_net/test/transport_worker_dispatcher.cpp
libcaf_net/test/transport_worker_dispatcher.cpp
+2
-1
No files found.
libcaf_net/caf/net/transport_worker_dispatcher.hpp
View file @
1db03f86
...
@@ -129,12 +129,14 @@ public:
...
@@ -129,12 +129,14 @@ public:
}
}
template
<
class
Parent
>
template
<
class
Parent
>
void
add_new_worker
(
Parent
&
parent
,
node_id
node
,
id_type
id
)
{
error
add_new_worker
(
Parent
&
parent
,
node_id
node
,
id_type
id
)
{
auto
application
=
factory_
.
make
();
auto
application
=
factory_
.
make
();
auto
worker
=
std
::
make_shared
<
worker_type
>
(
std
::
move
(
application
),
id
);
auto
worker
=
std
::
make_shared
<
worker_type
>
(
std
::
move
(
application
),
id
);
worker
->
init
(
parent
);
if
(
auto
err
=
worker
->
init
(
parent
))
return
err
;
workers_by_id_
.
emplace
(
std
::
move
(
id
),
worker
);
workers_by_id_
.
emplace
(
std
::
move
(
id
),
worker
);
workers_by_node_
.
emplace
(
std
::
move
(
node
),
std
::
move
(
worker
));
workers_by_node_
.
emplace
(
std
::
move
(
node
),
std
::
move
(
worker
));
return
none
;
}
}
private:
private:
...
...
libcaf_net/test/transport_worker_dispatcher.cpp
View file @
1db03f86
...
@@ -196,7 +196,8 @@ struct fixture : host_fixture {
...
@@ -196,7 +196,8 @@ struct fixture : host_fixture {
void
add_new_workers
()
{
void
add_new_workers
()
{
for
(
auto
&
data
:
test_data
)
{
for
(
auto
&
data
:
test_data
)
{
dispatcher
.
add_new_worker
(
dummy
,
data
.
nid
,
data
.
ep
);
if
(
auto
err
=
dispatcher
.
add_new_worker
(
dummy
,
data
.
nid
,
data
.
ep
))
CAF_FAIL
(
"add_new_worker returned an error: "
<<
err
);
}
}
buf
->
clear
();
buf
->
clear
();
}
}
...
...
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