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
e1e3eaca
Commit
e1e3eaca
authored
Oct 09, 2018
by
zhaozhao.zz
Committed by
antirez
Oct 15, 2018
Browse files
Avoid recreate write handler for protected client.
parent
b501fd5d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/networking.c
View file @
e1e3eaca
...
@@ -1072,6 +1072,10 @@ int handleClientsWithPendingWrites(void) {
...
@@ -1072,6 +1072,10 @@ int handleClientsWithPendingWrites(void) {
c
->
flags
&=
~
CLIENT_PENDING_WRITE
;
c
->
flags
&=
~
CLIENT_PENDING_WRITE
;
listDelNode
(
server
.
clients_pending_write
,
ln
);
listDelNode
(
server
.
clients_pending_write
,
ln
);
/* If a client is protected, don't do anything,
* that may trigger write error or recreate handler. */
if
(
c
->
flags
&
CLIENT_PROTECTED
)
continue
;
/* Try to write buffers to the client socket. */
/* Try to write buffers to the client socket. */
if
(
writeToClient
(
c
->
fd
,
c
,
0
)
==
C_ERR
)
continue
;
if
(
writeToClient
(
c
->
fd
,
c
,
0
)
==
C_ERR
)
continue
;
...
...
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