MCPcopy
hub / github.com/caddyserver/caddy / decInFlightRequest

Function decInFlightRequest

modules/caddyhttp/reverseproxy/reverseproxy.go:58–64  ·  view source on GitHub ↗
(address string)

Source from the content-addressed store, hash-verified

56}
57
58func decInFlightRequest(address string) {
59 if v, ok := inFlightRequests.Load(address); ok {
60 if v.(*atomic.Int64).Add(-1) <= 0 {
61 inFlightRequests.Delete(address)
62 }
63 }
64}
65
66func getInFlightRequests() map[string]int64 {
67 copyMap := make(map[string]int64)

Callers 1

reverseProxyMethod · 0.85

Calls 3

LoadMethod · 0.80
AddMethod · 0.45
DeleteMethod · 0.45

Tested by

no test coverage detected