Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
actor-incubator
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
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-incubator
Commits
fddf45e0
Commit
fddf45e0
authored
Dec 28, 2021
by
chenhuaqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed close opcode
parent
886f5e78
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
libcaf_net/caf/net/socket_manager.hpp
libcaf_net/caf/net/socket_manager.hpp
+2
-1
libcaf_net/caf/net/stream_transport.hpp
libcaf_net/caf/net/stream_transport.hpp
+7
-1
No files found.
libcaf_net/caf/net/socket_manager.hpp
View file @
fddf45e0
...
@@ -102,7 +102,8 @@ public:
...
@@ -102,7 +102,8 @@ public:
}
}
void
shutdown
()
{
void
shutdown
()
{
mask_
=
operation
::
shutdown
;
mask_del
(
operation
::
read
);
mask_add
(
operation
::
shutdown
);
}
}
// -- factories --------------------------------------------------------------
// -- factories --------------------------------------------------------------
...
...
libcaf_net/caf/net/stream_transport.hpp
View file @
fddf45e0
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
#include "caf/span.hpp"
#include "caf/span.hpp"
#include "caf/tag/io_event_oriented.hpp"
#include "caf/tag/io_event_oriented.hpp"
#include "caf/tag/stream_oriented.hpp"
#include "caf/tag/stream_oriented.hpp"
#include "operation.hpp"
namespace
caf
::
net
{
namespace
caf
::
net
{
...
@@ -267,7 +268,12 @@ public:
...
@@ -267,7 +268,12 @@ public:
auto
written
=
write
(
parent
->
handle
(),
write_buf_
);
auto
written
=
write
(
parent
->
handle
(),
write_buf_
);
if
(
written
>
0
)
{
if
(
written
>
0
)
{
write_buf_
.
erase
(
write_buf_
.
begin
(),
write_buf_
.
begin
()
+
written
);
write_buf_
.
erase
(
write_buf_
.
begin
(),
write_buf_
.
begin
()
+
written
);
return
!
write_buf_
.
empty
()
||
!
upper_layer_
.
done_sending
(
this_layer_ptr
);
bool
empty
=
write_buf_
.
empty
();
if
(
write_buf_
.
empty
()
&&
(
parent
->
mask
()
&
operation
::
shutdown
)
==
operation
::
shutdown
)
{
return
false
;
}
return
!
empty
||
!
upper_layer_
.
done_sending
(
this_layer_ptr
);
}
else
if
(
written
<
0
)
{
}
else
if
(
written
<
0
)
{
// Try again later on temporary errors such as EWOULDBLOCK and
// Try again later on temporary errors such as EWOULDBLOCK and
// stop writing to the socket on hard errors.
// stop writing to the socket on hard errors.
...
...
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