mirror of
https://github.com/dunglas/frankenphp
synced 2024-10-16 17:14:59 +00:00
fix: don't abort con when streaming not possible
This commit is contained in:
parent
2818dfb474
commit
b03ce0eb20
@ -561,17 +561,15 @@ func go_sapi_flush(rh C.uintptr_t) bool {
|
||||
r := cgo.Handle(rh).Value().(*http.Request)
|
||||
fc := r.Context().Value(contextKey).(*FrankenPHPContext)
|
||||
|
||||
if fc.responseWriter == nil {
|
||||
if fc.responseWriter == nil || clientHasClosed(r) {
|
||||
return true
|
||||
}
|
||||
|
||||
flusher, ok := fc.responseWriter.(http.Flusher)
|
||||
if !ok {
|
||||
return true
|
||||
}
|
||||
fc.Logger.Error("the current responseWriter does not implement the http.Flusher interface")
|
||||
|
||||
if clientHasClosed(r) {
|
||||
return true
|
||||
return false
|
||||
}
|
||||
|
||||
if r.ProtoMajor == 1 {
|
||||
|
Loading…
Reference in New Issue
Block a user