* fix: avoid stale stream writes after client disconnect * fix: wait for stream ping goroutines before returning * fix: log stream results after goroutine cleanup * fix: broadcast stream stop signals * fix: abort upstream on client disconnect and restore write error contracts Keep the goroutine-lifecycle fix (unconditional wg.Wait before returning the gin.Context, close resp.Body inside cleanup), but drop the drain-on-disconnect behavior: when the client goes away, cleanup now runs immediately so the upstream body is closed, the provider stops generating, and users are not billed for tokens produced after they disconnected. Also restore FlushWriter/StringData/PingData returning an error when the request context is done, so non-scanner relay loops (ollama, fake-stream, audio, image) keep their disconnect awareness instead of silently consuming the upstream to completion. ResponseChunkData now propagates write errors. Add a bounded per-write deadline (http.NewResponseController) before each locked stream write so a slow-but-connected client cannot block a write forever and hang the unconditional wg.Wait. --------- Co-authored-by: CaIon <i@caion.me>
| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| adaptor.go | Loading commit data... | |
| audio.go | Loading commit data... | |
| chat_via_responses.go | Loading commit data... | |
| chat_via_responses_test.go | Loading commit data... | |
| constant.go | Loading commit data... | |
| helper.go | Loading commit data... | |
| image_edit_test.go | Loading commit data... | |
| image_stream_test.go | Loading commit data... | |
| relay-openai.go | Loading commit data... | |
| relay_image.go | Loading commit data... | |
| relay_realtime.go | Loading commit data... | |
| relay_responses.go | Loading commit data... | |
| relay_responses_compact.go | Loading commit data... | |
| responses_via_chat.go | Loading commit data... | |
| usage.go | Loading commit data... |