Closed PPunya closed 1 month ago
In RedisConnection actor, when mode is .subscriber, it calls sendNoReceive and there it demands the mode to be .normal. Could we have it asserted as mode == .subscriber within sendNoReceive(value: RESPValue) and receive()?
RedisConnection
sendNoReceive
mode
.normal
mode == .subscriber
sendNoReceive(value: RESPValue)
receive()
func subscribe(channels: String...) async throws -> AnyAsyncSequence<Pubsub> { 1. mode = .subscriber logger?.debug("\(#function)") 2. try await sendNoReceive(value: ["SUBSCRIBE"] + channels) func sendNoReceive(value: [String]) async throws { 3. try await sendNoReceive(value: value) public func sendNoReceive(value: RESPValue) async throws { 4. assert(mode == .normal)
Thanks.
I'm not actively developing this project.
I'll take a look at any PR though.
Sure.
In
RedisConnection
actor, when mode is .subscriber, it callssendNoReceive
and there it demands themode
to be.normal
. Could we have it asserted asmode == .subscriber
withinsendNoReceive(value: RESPValue)
andreceive()
?Thanks.