Skip to content

Commit

Permalink
chnage disconnect for unusable conn, fix logging level
Browse files Browse the repository at this point in the history
  • Loading branch information
FZambia committed Jan 18, 2023
1 parent 5dd8d1b commit ac44fd4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion broker_redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ func (b *RedisBroker) runPubSub(s *shardWrapper, eventHandler BrokerEventHandler
go func() {
wg.Wait()
if len(channels) > 0 && b.node.LogEnabled(LogLevelDebug) {
b.node.Log(NewLogEntry(LogLevelError, "resubscribed to channels", map[string]interface{}{"elapsed": time.Since(started).String(), "numChannels": len(channels)}))
b.node.Log(NewLogEntry(LogLevelDebug, "resubscribed to channels", map[string]interface{}{"elapsed": time.Since(started).String(), "numChannels": len(channels)}))
}
select {
case <-done:
Expand Down
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,7 @@ func (c *Client) HandleCommand(cmd *protocol.Command, cmdProtocolSize int) bool
c.mu.Unlock()

if unusable {
go func() { _ = c.close(DisconnectInsufficientState) }()
go func() { _ = c.close(DisconnectBadRequest) }()
return false
}

Expand Down

0 comments on commit ac44fd4

Please sign in to comment.