zeekayandHanzo Dev 9e1383182f fix: this package has never compiled
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]>
2026-07-29 11:05:28 -07:00
2026-05-16 16:59:14 -07:00
2026-07-29 11:05:28 -07:00
2026-07-29 11:05:28 -07:00
S
Description
No description provided
Apache-2.0
45 KiB
Languages
Go 100%