mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-23 09:00:20 +08:00
fixbug:superfluous response.WriteHeader (#3083)
This commit is contained in:
parent
ee555a85da
commit
e06abf4f6f
@ -183,7 +183,9 @@ func (tw *timeoutWriter) writeHeaderLocked(code int) {
|
||||
func (tw *timeoutWriter) WriteHeader(code int) {
|
||||
tw.mu.Lock()
|
||||
defer tw.mu.Unlock()
|
||||
tw.writeHeaderLocked(code)
|
||||
if !tw.wroteHeader {
|
||||
tw.writeHeaderLocked(code)
|
||||
}
|
||||
}
|
||||
|
||||
func checkWriteHeaderCode(code int) {
|
||||
|
Loading…
Reference in New Issue
Block a user