Skip to content

Commit 7c59338

Browse files
committed
Fix broken pipe waker
1 parent 150ebea commit 7c59338

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sys/unix/selector/kqueue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ impl Selector {
129129
})
130130
}
131131

132-
cfg_io_source! {
133132
pub fn register(&self, fd: RawFd, token: Token, interests: Interest) -> io::Result<()> {
134133
let flags = libc::EV_CLEAR | libc::EV_RECEIPT | libc::EV_ADD;
135134
// At most we need two changes, but maybe we only need 1.
@@ -169,6 +168,7 @@ impl Selector {
169168
kevent_register(self.kq.as_raw_fd(), changes, &[libc::EPIPE as i64])
170169
}
171170

171+
cfg_io_source! {
172172
pub fn reregister(&self, fd: RawFd, token: Token, interests: Interest) -> io::Result<()> {
173173
let flags = libc::EV_CLEAR | libc::EV_RECEIPT;
174174
let write_flags = if interests.is_writable() {

0 commit comments

Comments
 (0)