We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2fd4db6 commit 43d9445Copy full SHA for 43d9445
Sources/RediStack/RedisConnectionPool.swift
@@ -208,9 +208,8 @@ extension RedisConnectionPool {
208
.map { connection in
209
// disallow subscriptions on all connections by default to enforce our management of PubSub state
210
connection.allowSubscriptions = false
211
- connection.onUnexpectedClosure = { [weak self, weak connection] in
212
- guard let connection = connection else { return }
213
- self?.configuration.onUnexpectedConnectionClose?(connection)
+ connection.channel.closeFuture.whenComplete { _ in
+ self.configuration.onUnexpectedConnectionClose?(connection)
214
}
215
return connection
216
0 commit comments