Skip to content

Commit

Permalink
fix: use the main queue for data callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
pokryfka committed Oct 24, 2023
1 parent 08ae2b0 commit 43c238b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/GraphQLWebSocket/Client.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public class GraphQLWebSocket: NSObject, URLSessionWebSocketDelegate {
/// The task used to receive messages from the server.
private var receiveTask: Task<Void, Never>?

private let dataQueue = DispatchQueue(label: "GraphQLWebSocket-\(UUID().uuidString)")
// use the main queue which is by default used by Starscream and was assumed in previous implementation
private let dataQueue = DispatchQueue.main

/// Holds information about the connection health and what the client is doing about it.
private var health: Health = Health.notconnected
Expand Down

0 comments on commit 43c238b

Please sign in to comment.