Skip to content

Commit 579c0fc

Browse files
committed
Fix SocketDescriptor.Event.Flags
1 parent cd69948 commit 579c0fc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Sources/Socket/System/SocketEvent.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ public extension SocketDescriptor.Event.Flags {
4848
///
4949
/// See the description of the `O_CLOEXEC` flag in `open(2)` for reasons why this may be useful.
5050
@_alwaysEmitIntoClient
51-
static var nonBlocking: SocketDescriptor.Event.Flags { SocketDescriptor.Event.Flags(_EFD_CLOEXEC) }
51+
static var nonBlocking: SocketDescriptor.Event.Flags { SocketDescriptor.Event.Flags(_EFD_NONBLOCK) }
5252

5353
/// Set the `O_NONBLOCK` file status flag on the new open file description.
5454
///
5555
/// Using this flag saves extra calls to `fcntl(2)` to achieve the same result.
5656
@_alwaysEmitIntoClient
57-
static var closeOnExec: SocketDescriptor.Event.Flags { SocketDescriptor.Event.Flags(_EFD_NONBLOCK) }
57+
static var closeOnExec: SocketDescriptor.Event.Flags { SocketDescriptor.Event.Flags(_EFD_CLOEXEC) }
5858

5959
/// Provide semaphore-like semantics for reads from the new file descriptor.
6060
@_alwaysEmitIntoClient

0 commit comments

Comments
 (0)