mirror of
https://github.com/luxfi/fasthttp.git
synced 2026-09-24 00:24:04 +00:00
9e1383182ffffa15c84271b930412437dba70f48
Two defects, both in server.go, both fatal: TCPKeepalive is fasthttp own on/off flag (bool); the interval field is TCPKeepalivePeriod. Assigning 3*time.Minute to the flag is a type error, so the package failed to build for every consumer — luxfi/adx among them. HandleRequest computed `duration := time.Since(start)` under a comment reading "Increment counters atomically" and then did nothing with it. An unused local is also a compile error, so even fixing the first defect left this one. The three metrics fields (requestsInFlight, requestsTotal, requestDuration) were declared and never written anywhere. Rather than delete `duration` to silence the compiler, this wires the counters the comment described and adds Stats() to read them — write-only counters would be no better than not keeping any. Builds clean, go vet clean. Co-authored-by: Hanzo Dev <[email protected]>
Languages
Go
100%