Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
71f10de4
Commit
71f10de4
authored
Oct 15, 2019
by
Yossi Gottlieb
Browse files
Conns: write() 0 retval should not trigger error.
parent
01321890
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/connection.c
View file @
71f10de4
...
...
@@ -162,9 +162,7 @@ static void connSocketClose(connection *conn) {
static
int
connSocketWrite
(
connection
*
conn
,
const
void
*
data
,
size_t
data_len
)
{
int
ret
=
write
(
conn
->
fd
,
data
,
data_len
);
if
(
!
ret
)
{
conn
->
state
=
CONN_STATE_CLOSED
;
}
else
if
(
ret
<
0
&&
errno
!=
EAGAIN
)
{
if
(
ret
<
0
&&
errno
!=
EAGAIN
)
{
conn
->
last_errno
=
errno
;
conn
->
state
=
CONN_STATE_ERROR
;
}
...
...
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