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
e150ce3c
Commit
e150ce3c
authored
May 23, 2012
by
jokea
Committed by
antirez
May 23, 2012
Browse files
Set fd to writable when poll(2) detects POLLERR or POLLHUP event.
parent
348ee1a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ae.c
View file @
e150ce3c
...
...
@@ -385,6 +385,8 @@ int aeWait(int fd, int mask, long long milliseconds) {
if
((
retval
=
poll
(
&
pfd
,
1
,
milliseconds
))
==
1
)
{
if
(
pfd
.
revents
&
POLLIN
)
retmask
|=
AE_READABLE
;
if
(
pfd
.
revents
&
POLLOUT
)
retmask
|=
AE_WRITABLE
;
if
(
pfd
.
revents
&
POLLERR
)
retmask
|=
AE_WRITABLE
;
if
(
pfd
.
revents
&
POLLHUP
)
retmask
|=
AE_WRITABLE
;
return
retmask
;
}
else
{
return
retval
;
...
...
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