Skip to content

Commit

Permalink
Fix stopAndWait() hang when -Owholemodule
Browse files Browse the repository at this point in the history
  • Loading branch information
Interfere committed May 11, 2018
1 parent abdc918 commit 72bb2c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/SelectorEventLoop.swift
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,9 @@ public final class SelectorEventLoop: EventLoop {
// interrupt the selector
private func interruptSelector() {
let byte = [UInt8](repeating: 0, count: 1)
let rc = write(pipeSender, byte, byte.count)
assert(
write(pipeSender, byte, byte.count) >= 0,
rc >= 0,
"Failed to interrupt selector, errno=\(errno), message=\(lastErrorDescription())"
)
}
Expand Down

0 comments on commit 72bb2c7

Please sign in to comment.