Skip to content

Commit

Permalink
Merge pull request #53 from Interfere/fix-stopAndWait-hang
Browse files Browse the repository at this point in the history
Fix stopAndWait() hang when -Owholemodule
  • Loading branch information
fangpenlin authored May 13, 2018
2 parents abdc918 + 72bb2c7 commit e981038
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 e981038

Please sign in to comment.