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
0ae125e9
Commit
0ae125e9
authored
Jul 25, 2016
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix possible segfault in new_connection
parent
f2d26fdf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
6 deletions
+12
-6
libcaf_io/caf/io/network/asio_multiplexer_impl.hpp
libcaf_io/caf/io/network/asio_multiplexer_impl.hpp
+6
-0
libcaf_io/src/default_multiplexer.cpp
libcaf_io/src/default_multiplexer.cpp
+6
-0
libcaf_io/src/doorman.cpp
libcaf_io/src/doorman.cpp
+0
-6
No files found.
libcaf_io/caf/io/network/asio_multiplexer_impl.hpp
View file @
0ae125e9
...
...
@@ -248,6 +248,12 @@ asio_multiplexer::add_tcp_doorman(abstract_broker* self,
}
bool
new_connection
()
override
{
CAF_LOG_TRACE
(
""
);
if
(
detached
())
// we are already disconnected from the broker while the multiplexer
// did not yet remove the socket, this can happen if an I/O event causes
// the broker to call close_all() while the pollset contained
// further activities for the broker
return
false
;
auto
&
am
=
acceptor_
.
backend
();
auto
x
=
am
.
add_tcp_scribe
(
parent
(),
std
::
move
(
acceptor_
.
accepted_socket
()));
...
...
libcaf_io/src/default_multiplexer.cpp
View file @
0ae125e9
...
...
@@ -811,6 +811,12 @@ accept_handle default_multiplexer::add_tcp_doorman(abstract_broker* self,
}
bool
new_connection
()
override
{
CAF_LOG_TRACE
(
""
);
if
(
detached
())
// we are already disconnected from the broker while the multiplexer
// did not yet remove the socket, this can happen if an I/O event causes
// the broker to call close_all() while the pollset contained
// further activities for the broker
return
false
;
auto
&
dm
=
acceptor_
.
backend
();
auto
hdl
=
dm
.
add_tcp_scribe
(
parent
(),
std
::
move
(
acceptor_
.
accepted_socket
()));
...
...
libcaf_io/src/doorman.cpp
View file @
0ae125e9
...
...
@@ -47,12 +47,6 @@ void doorman::io_failure(execution_unit* ctx, network::operation op) {
}
bool
doorman
::
new_connection
(
execution_unit
*
ctx
,
connection_handle
x
)
{
if
(
detached
())
// we are already disconnected from the broker while the multiplexer
// did not yet remove the socket, this can happen if an I/O event causes
// the broker to call close_all() while the pollset contained
// further activities for the broker
return
false
;
msg
().
handle
=
x
;
return
invoke_mailbox_element
(
ctx
);
}
...
...
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