mirror of
https://github.com/lukaszraczylo/traefik-llmgateway.git
synced 2026-11-26 10:06:31 +00:00
fix(shared-state): restart the loop when an in-flight request ends
A request that outlived the idle window ended after the loop had stopped. Its finish delta then stayed queued with no loop to send it. The end function now touches the loop.
This commit is contained in:
+5
-1
@@ -668,7 +668,11 @@ func (s *sharedInflight) begin(provider string) func() {
|
||||
s.add(provider, epoch, "s")
|
||||
var once sync.Once
|
||||
return func() {
|
||||
once.Do(func() { s.add(provider, epoch, "f") })
|
||||
once.Do(func() {
|
||||
s.add(provider, epoch, "f")
|
||||
// An idle-stopped loop must restart, or this delta is never flushed.
|
||||
s.loop.touch()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user