Implemented tests for SUBSCRIBE, PSUBSCRIBE, UNSUBSCRIBE, and PUNSUBSCRIBE command handlers

This commit is contained in:
Kelvin Mwinuka
2024-03-17 02:41:49 +08:00
parent e685d5041b
commit dbfa398543
4 changed files with 303 additions and 47 deletions

View File

@@ -261,7 +261,10 @@ func (server *Server) StartTCP(ctx context.Context) {
}
func (server *Server) handleConnection(ctx context.Context, conn net.Conn) {
server.ACL.RegisterConnection(&conn)
// If ACL module is loaded, register the connection with the ACL
if server.ACL != nil {
server.ACL.RegisterConnection(&conn)
}
w, r := io.Writer(conn), io.Reader(conn)