Skip to content

Commit 7308f26

Browse files
committed
Fixed SocketDescriptor.Event.write()
1 parent e4e4723 commit 7308f26

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Sources/Socket/System/SocketEvent.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ extension SocketDescriptor.Event {
128128
retryOnInterrupt: Bool
129129
) -> Result<SocketDescriptor.Event, Errno> {
130130
valueOrErrno(retryOnInterrupt: retryOnInterrupt) {
131-
system_eventfd(counter.rawValue, flags.rawValue)
131+
system_eventfd(counter, flags.rawValue)
132132
}.map({ SocketDescriptor.Event(rawValue: $0) })
133133
}
134134

@@ -138,7 +138,7 @@ extension SocketDescriptor.Event {
138138
flags: SocketDescriptor.Event.Flags = [],
139139
retryOnInterrupt: Bool = true
140140
) throws(Errno) {
141-
self = try Self._events(counter.rawValue, flags: flags, retryOnInterrupt: retryOnInterrupt).get()
141+
self = try Self._events(counter, flags: flags, retryOnInterrupt: retryOnInterrupt).get()
142142
}
143143

144144
/// Deletes a file descriptor.
@@ -201,8 +201,8 @@ extension SocketDescriptor.Event {
201201
public func write(
202202
_ counter: Counter,
203203
retryOnInterrupt: Bool = true
204-
) throws(Errno) -> Int {
205-
try _write(buffer, retryOnInterrupt: retryOnInterrupt).get()
204+
) throws(Errno) {
205+
try _write(counter, retryOnInterrupt: retryOnInterrupt).get()
206206
}
207207

208208
@usableFromInline

0 commit comments

Comments
 (0)