Skip to content

Commit a3f6d3b

Browse files
committed
Merge branch 'remove-assertions' into 'master'
Remove unnecessary assertions in `RedisCommandHandler` See merge request Mordil/swift-redi-stack!85
2 parents 237f049 + ba66ebf commit a3f6d3b

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

Sources/RediStack/ChannelHandlers/RedisCommandHandler.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ extension RedisCommandHandler: ChannelInboundHandler {
7676
public func errorCaught(context: ChannelHandlerContext, error: Error) {
7777
let queue = self.commandResponseQueue
7878

79-
assert(queue.count > 0, "Received unexpected error while idle: \(error.localizedDescription)")
80-
8179
self.commandResponseQueue.removeAll()
8280
queue.forEach { $0.fail(error) }
8381

@@ -95,7 +93,6 @@ extension RedisCommandHandler: ChannelInboundHandler {
9593
let value = self.unwrapInboundIn(data)
9694

9795
guard let leadPromise = self.commandResponseQueue.popFirst() else {
98-
assertionFailure("Read triggered with an empty promise queue! Ignoring: \(value)")
9996
self.logger.critical("Read triggered with no promise waiting in the queue!")
10097
return
10198
}

0 commit comments

Comments
 (0)