add singleflight to web requests

This commit is contained in:
Niko Storni 2022-05-02 23:07:22 +02:00
parent 2f7d67794f
commit 29d1ccf68c

View file

@ -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)