Skip to content

Commit 0d55e7e

Browse files
committed
Reuse currentEventLoop for client connection
If the user didn't specify an explicit eventLoop, use the currentEventLoop. If there is none, create a new, 1-threaded EventLoopGroup as a fallback.
1 parent fb801ec commit 0d55e7e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sources/Redis/RedisClientOptions.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ open class ConnectOptions : CustomStringConvertible {
2727
self.hostname = hostname
2828
self.port = port
2929
self.eventLoopGroup = eventLoopGroup
30+
?? MultiThreadedEventLoopGroup.currentEventLoop
3031
?? MultiThreadedEventLoopGroup(numThreads: 1)
3132
}
3233

0 commit comments

Comments
 (0)