Skip to content

Commit 08817a9

Browse files
author
i2cjak
authored
Merge pull request #29 from i2cjak/ios-ws-message-size
iOS: take hub frames up to 64 MB
2 parents d21c849 + 2c63eb7 commit 08817a9

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎mobile/ios/Backplane/Hub.swift‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ final class Hub {
104104
Task {
105105
guard let u = await url(), gen == generation, !stopped else { return }
106106
let t = URLSession.shared.webSocketTask(with: u)
107+
// the first frame is the whole log (megabytes on a busy hub);
108+
// past the 1 MB default every receive fails and it reconnects forever
109+
t.maximumMessageSize = 64 << 20
107110
task = t
108111
t.resume()
109112
// the first message proves the socket is up (the hub greets at once)

0 commit comments

Comments
 (0)