Skip to content

Commit cd91484

Browse files
committed
fix events
1 parent 1d50af7 commit cd91484

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/bun-usockets/src/eventing/epoll_kqueue.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ void us_loop_run(struct us_loop_t *loop) {
228228
// > Instead, the filter will aggregate the events into a single kevent struct
229229
// Note: EV_ERROR only sets the error in data as part of changelist. Not in this call!
230230
int events = 0
231-
| ((filter & EVFILT_READ) ? LIBUS_SOCKET_READABLE : 0)
232-
| ((filter & EVFILT_WRITE) ? LIBUS_SOCKET_WRITABLE : 0);
231+
| ((filter == EVFILT_READ) ? LIBUS_SOCKET_READABLE : 0)
232+
| ((filter == EVFILT_WRITE) ? LIBUS_SOCKET_WRITABLE : 0);
233233
const int error = (flags & (EV_ERROR)) ? ((int)fflags || 1) : 0;
234234
const int eof = (flags & (EV_EOF));
235235
#endif

0 commit comments

Comments
 (0)