mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-02-12 11:46:10 +02:00
Respond with 499 is a client closed the connection
This commit is contained in:
parent
20c33ad273
commit
e31950e1ef
4
timer.go
4
timer.go
@ -21,6 +21,10 @@ func checkTimeout(ctx context.Context) {
|
||||
case <-ctx.Done():
|
||||
d := getTimerSince(ctx)
|
||||
|
||||
if ctx.Err() != context.DeadlineExceeded {
|
||||
panic(newError(499, fmt.Sprintf("Request was cancelled after %v", d), "Cancelled"))
|
||||
}
|
||||
|
||||
if newRelicEnabled {
|
||||
sendTimeoutToNewRelic(ctx, d)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user