Skip to content

Commit 705d332

Browse files
committed
ePOLL handle delete
1 parent 03412e3 commit 705d332

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

FlyingSocks/Sources/EventQueue+ePoll.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ struct ePoll: EventQueue {
7979

8080
if existing[socket] != nil {
8181
if events.isEmpty {
82-
guard epoll_ctl(file.rawValue, EPOLL_CTL_ADD, socket.rawValue, &event) != -1 else {
83-
throw SocketError.makeFailed("epoll_ctl EPOLL_CTL_ADD")
82+
guard epoll_ctl(file.rawValue, EPOLL_CTL_DEL, socket.rawValue, &event) != -1 else {
83+
throw SocketError.makeFailed("epoll_ctl EPOLL_CTL_DEL")
8484
}
8585
} else {
8686
guard epoll_ctl(file.rawValue, EPOLL_CTL_MOD, socket.rawValue, &event) != -1 else {

0 commit comments

Comments
 (0)