Skip to content
This repository has been archived by the owner on Mar 17, 2024. It is now read-only.

Commit

Permalink
try fix #240, add flush to grpcSimple
Browse files Browse the repository at this point in the history
  • Loading branch information
e1732a364fed committed Feb 12, 2023
1 parent 825d60c commit aa44011
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion advLayer/grpcSimple/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func (s *Server) StartHandle(underlay net.Conn, newSubConnFunc func(net.Conn), f
return
}

//log.Println("request headers", rq.Header)
//log.Println("request headers", rq.ContentLength, rq.Header)

shouldFallback := false

Expand Down Expand Up @@ -208,6 +208,9 @@ func (s *Server) StartHandle(underlay net.Conn, newSubConnFunc func(net.Conn), f
}
}
rw.WriteHeader(http.StatusOK)
if flusher, ok := rw.(http.Flusher); ok {
flusher.Flush()
}

sc := newServerConn(rw, rq)
if s.closed {
Expand Down

0 comments on commit aa44011

Please sign in to comment.