Skip to content

Commit ee01188

Browse files
committed
Only add if events exist
1 parent 705d332 commit ee01188

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

FlyingSocks/Sources/EventQueue+ePoll.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ struct ePoll: EventQueue {
8787
throw SocketError.makeFailed("epoll_ctl EPOLL_CTL_MOD")
8888
}
8989
}
90-
} else {
90+
} else if !events.isEmpty {
9191
guard epoll_ctl(file.rawValue, EPOLL_CTL_ADD, socket.rawValue, &event) != -1 else {
9292
throw SocketError.makeFailed("epoll_ctl EPOLL_CTL_ADD")
9393
}

0 commit comments

Comments
 (0)