Skip to content

Commit

Permalink
Set max message size for ws connections.
Browse files Browse the repository at this point in the history
  • Loading branch information
kukabi committed Nov 28, 2024
1 parent d5fee65 commit 04c8c60
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ public class RPCSubscriptionService<T: Codable>: NSObject, ObservableObject, URL
let session = URLSession(configuration: .default, delegate: self, delegateQueue: nil)
session.configuration.timeoutIntervalForRequest = timeoutSeconds
self.task = session.webSocketTask(with: url)
self.task?.maximumMessageSize = 1024 * 1024 * 2
self.receive()
self.task?.resume()
default:
Expand Down

0 comments on commit 04c8c60

Please sign in to comment.