Skip to content

Commit 6800a75

Browse files
committed
Use optimal event loop group dependent on platform
1 parent b5d96a1 commit 6800a75

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ios/RNGrpc.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ typealias GrpcCall = any ClientCall
1414

1515
@objc(Grpc)
1616
class RNGrpc: RCTEventEmitter {
17-
private let group: EventLoopGroup = MultiThreadedEventLoopGroup(numberOfThreads: System.coreCount)
17+
private let group = PlatformSupport.makeEventLoopGroup(loopCount: System.coreCount)
1818

1919
var grpcInsecure = false
2020
var grpcHost: String?
@@ -362,7 +362,7 @@ class RNGrpc: RCTEventEmitter {
362362

363363
var config = GRPCChannelPool.Configuration.with(
364364
target: .hostAndPort(host, port),
365-
transportSecurity: self.grpcInsecure ? .plaintext : .tls(.makeClientConfigurationBackedByNIOSSL()),
365+
transportSecurity: self.grpcInsecure ? .plaintext : .tls(.makeClientDefault(compatibleWith: self.group)),
366366
eventLoopGroup: self.group
367367
)
368368

0 commit comments

Comments
 (0)