Skip to content

Commit

Permalink
Deny new clients if the diagnostic connection is down to prevent log …
Browse files Browse the repository at this point in the history
…spamming
  • Loading branch information
PatrickTaibel committed Oct 24, 2023
1 parent 294c2e1 commit 73de69b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,11 @@ func (this *RedisMultiplexer) initializeClient(localConnection net.Conn, transac
myClient.Connection.Close()
}()

if this.activeConnectionCount < 1 {
protocol.WriteError([]byte("No Redis server available"), myClient.Writer, true)
return
}

this.HandleClientRequests(myClient)
}

Expand Down

0 comments on commit 73de69b

Please sign in to comment.