perf: slightly optimize the value`s type of map to save memory space in file redis/server/server.go

Limited ability, hope to make it better~
This commit is contained in:
zhengtianyi
2022-11-02 09:30:52 +08:00
committed by finley
parent 55fd1d399d
commit 624f7c7926

View File

@@ -61,7 +61,7 @@ func (h *Handler) Handle(ctx context.Context, conn net.Conn) {
}
client := connection.NewConn(conn)
h.activeConn.Store(client, 1)
h.activeConn.Store(client, struct{}{})
ch := parser.ParseStream(conn)
for payload := range ch {