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
da7f5700
Commit
da7f5700
authored
Mar 01, 2018
by
charsyam
Browse files
refactoring-call-aeDeleteFileEvent-twice-in-freeClusterLink
parent
83b5b5a4
Changes
1
Show whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
da7f5700
...
@@ -581,8 +581,7 @@ clusterLink *createClusterLink(clusterNode *node) {
...
@@ -581,8 +581,7 @@ clusterLink *createClusterLink(clusterNode *node) {
* with this link will have the 'link' field set to NULL. */
* with this link will have the 'link' field set to NULL. */
void
freeClusterLink
(
clusterLink
*
link
)
{
void
freeClusterLink
(
clusterLink
*
link
)
{
if
(
link
->
fd
!=
-
1
)
{
if
(
link
->
fd
!=
-
1
)
{
aeDeleteFileEvent
(
server
.
el
,
link
->
fd
,
AE_WRITABLE
);
aeDeleteFileEvent
(
server
.
el
,
link
->
fd
,
AE_READABLE
|
AE_WRITABLE
);
aeDeleteFileEvent
(
server
.
el
,
link
->
fd
,
AE_READABLE
);
}
}
sdsfree
(
link
->
sndbuf
);
sdsfree
(
link
->
sndbuf
);
sdsfree
(
link
->
rcvbuf
);
sdsfree
(
link
->
rcvbuf
);
...
...
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