We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
wait(for:fileDescriptor:)
1 parent 322cd72 commit c67494eCopy full SHA for c67494e
1 file changed
Sources/Socket/SocketManager/AsyncSocketManager.swift
@@ -267,6 +267,10 @@ private extension AsyncSocketManager {
267
try await withThrowingContinuation(for: fileDescriptor) { (continuation: SocketContinuation<(), Swift.Error>) -> () in
268
// store pending continuation
269
Task {
270
+ guard await socket.pendingEvents.contains(events) == false else {
271
+ continuation.resume()
272
+ return
273
+ }
274
await socket.queue(events, continuation)
275
}
276
0 commit comments