From 04c8c600b3268673dc783ebf09181b20db38cb85 Mon Sep 17 00:00:00 2001 From: kukabi Date: Thu, 28 Nov 2024 16:43:28 +0300 Subject: [PATCH] Set max message size for ws connections. --- Sources/SubVTData/Service/WSPRC/RPCSubscriptionService.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/SubVTData/Service/WSPRC/RPCSubscriptionService.swift b/Sources/SubVTData/Service/WSPRC/RPCSubscriptionService.swift index adfce37..36245a6 100644 --- a/Sources/SubVTData/Service/WSPRC/RPCSubscriptionService.swift +++ b/Sources/SubVTData/Service/WSPRC/RPCSubscriptionService.swift @@ -102,6 +102,7 @@ public class RPCSubscriptionService: 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: