Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions FlyingSocks/Sources/SocketPool+kQueue.swift
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ public struct kQueue: EventQueue {
var events = Array(repeating: kevent(), count: eventsLimit)
let status = kevent(file.rawValue, nil, 0, &events, Int32(eventsLimit), nil)
guard status > 0 else {
// EINTR (signal) is not a failure: report no events so the caller
// polls again rather than tearing down the server. See kevent(2).
if status == -1 && errno == EINTR {
return []
}
throw SocketError.makeFailed("kqueue kevent")
}

Expand Down
Loading