From 29d1ccf68cd33d9391bee215e6e0374c91473fbf Mon Sep 17 00:00:00 2001 From: Niko Storni Date: Mon, 2 May 2022 23:07:22 +0200 Subject: [PATCH] add singleflight to web requests --- cmd/reflector.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/reflector.go b/cmd/reflector.go index 017b9bf..d7b89aa 100644 --- a/cmd/reflector.go +++ b/cmd/reflector.go @@ -130,7 +130,7 @@ func reflectorCmd(cmd *cobra.Command, args []string) { } defer http3PeerServer.Shutdown() - httpServer := http.NewServer(underlyingStoreWithCaches, requestQueueSize) + httpServer := http.NewServer(store.WithSingleFlight("sf-http", underlyingStoreWithCaches), requestQueueSize) err = httpServer.Start(":" + strconv.Itoa(httpPeerPort)) if err != nil { log.Fatal(err)