mirror of
https://github.com/coder/coder.git
synced 2025-07-09 11:45:56 +00:00
chore: Add flusher to make implement http.Flusher interface (#4255)
This commit is contained in:
@ -127,3 +127,9 @@ type hijacker struct {
|
|||||||
func (hijacker) Hijack() (net.Conn, *bufio.ReadWriter, error) {
|
func (hijacker) Hijack() (net.Conn, *bufio.ReadWriter, error) {
|
||||||
return nil, nil, xerrors.New("hijacked")
|
return nil, nil, xerrors.New("hijacked")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (h hijacker) Flush() {
|
||||||
|
if f, ok := h.ResponseWriter.(http.Flusher); ok {
|
||||||
|
f.Flush()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user