ensureHeaders closes gotHeaders if it has not already been closed, with the current status. Used to unblock RoundTrip on handler return-without-write.
()
| 195 | // ensureHeaders closes gotHeaders if it has not already been closed, with the |
| 196 | // current status. Used to unblock RoundTrip on handler return-without-write. |
| 197 | func (w *pipeResponseWriter) ensureHeaders() { |
| 198 | w.once.Do(func() { |
| 199 | close(w.gotHeaders) |
| 200 | }) |
| 201 | } |
| 202 | |
| 203 | var ( |
| 204 | _ http.ResponseWriter = (*pipeResponseWriter)(nil) |