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
76a31e23
Unverified
Commit
76a31e23
authored
Jul 16, 2021
by
Dominik Charousset
Committed by
GitHub
Jul 16, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1281
Fix a crash related to SSL_ERROR_WANT_READ
parents
2cabff9c
3806b80b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
3 deletions
+15
-3
CHANGELOG.md
CHANGELOG.md
+9
-0
libcaf_io/caf/io/network/default_multiplexer.hpp
libcaf_io/caf/io/network/default_multiplexer.hpp
+1
-1
libcaf_io/src/io/network/stream.cpp
libcaf_io/src/io/network/stream.cpp
+5
-2
No files found.
CHANGELOG.md
View file @
76a31e23
...
...
@@ -3,6 +3,15 @@
All notable changes to this project will be documented in this file. The format
is based on
[
Keep a Changelog
](
https://keepachangelog.com
)
.
## Unreleased
### Fixed
-
0.18.4 introduced a potential crash when using the OpenSSL module and
encountering
`SSL_ERROR_WANT_READ`
. The crash manifested if CAF resumed a
write operation but failed to fully reset its state. The state management (and
consequently the crash) has been fixed.
## [0.18.4] - 2021-07-07
### Added
...
...
libcaf_io/caf/io/network/default_multiplexer.hpp
View file @
76a31e23
...
...
@@ -190,7 +190,7 @@ private:
auto
bf
=
i
->
mask
;
i
->
mask
=
fun
(
op
,
bf
);
if
(
i
->
mask
==
bf
)
{
// didn'
""
t do a thing
// didn't do a thing
CAF_LOG_DEBUG
(
"squashing did not change the event"
);
}
else
if
(
i
->
mask
==
old_bf
)
{
// just turned into a nop
...
...
libcaf_io/src/io/network/stream.cpp
View file @
76a31e23
...
...
@@ -54,7 +54,7 @@ void stream::write(const void* buf, size_t num_bytes) {
void
stream
::
flush
(
const
manager_ptr
&
mgr
)
{
CAF_ASSERT
(
mgr
!=
nullptr
);
CAF_LOG_TRACE
(
CAF_ARG
(
wr_offline_buf_
.
size
()));
if
(
!
wr_offline_buf_
.
empty
()
&&
!
state_
.
writing
)
{
if
(
!
wr_offline_buf_
.
empty
()
&&
!
state_
.
writing
&&
!
wr_op_backoff_
)
{
backend
().
add
(
operation
::
write
,
fd
(),
this
);
writer_
=
mgr
;
state_
.
writing
=
true
;
...
...
@@ -125,7 +125,7 @@ void stream::prepare_next_write() {
CAF_LOG_TRACE
(
CAF_ARG
(
wr_buf_
.
size
())
<<
CAF_ARG
(
wr_offline_buf_
.
size
()));
written_
=
0
;
wr_buf_
.
clear
();
if
(
wr_offline_buf_
.
empty
())
{
if
(
wr_offline_buf_
.
empty
()
||
wr_op_backoff_
)
{
state_
.
writing
=
false
;
backend
().
del
(
operation
::
write
,
fd
(),
this
);
if
(
state_
.
shutting_down
)
...
...
@@ -147,7 +147,10 @@ bool stream::handle_read_result(rw_state read_result, size_t rb) {
// Recover previous pending write if it is the first successful read after
// want_read was reported.
if
(
wr_op_backoff_
)
{
CAF_ASSERT
(
reader_
!=
nullptr
);
backend
().
add
(
operation
::
write
,
fd
(),
this
);
writer_
=
reader_
;
state_
.
writing
=
true
;
wr_op_backoff_
=
false
;
}
[[
fallthrough
]];
...
...
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