Flush implements net/http.Flusher interface
()
| 604 | |
| 605 | // Flush implements net/http.Flusher interface |
| 606 | func (rwa *responseWriterWithAbort) Flush() { |
| 607 | if rwa.aborted { |
| 608 | return |
| 609 | } |
| 610 | if !rwa.sentHeaders { |
| 611 | rwa.sentHeaders = true |
| 612 | } |
| 613 | flusher, ok := rwa.ResponseWriter.(http.Flusher) |
| 614 | if !ok { |
| 615 | logger.Panicf("BUG: it is expected http.ResponseWriter (%T) supports http.Flusher interface", rwa.ResponseWriter) |
| 616 | } |
| 617 | flusher.Flush() |
| 618 | } |
| 619 | |
| 620 | // abort aborts the client connection associated with rwa. |
| 621 | // |