Skip to content

Commit c1ec78e

Browse files
committed
ensure immediate return
1 parent 5fd6cca commit c1ec78e

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

internals/server/http.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ func httpHandler(w http.ResponseWriter, req *http.Request) {
4343
w.Header().Set("Content-Type", "application/json")
4444
json.NewEncoder(w).Encode(resp)
4545

46+
f, ok := w.(http.Flusher)
47+
if ok {
48+
f.Flush()
49+
}
50+
4651
client, err := waitForClient(clientID, time.Duration(20 * time.Second))
4752

4853
if err != nil {

0 commit comments

Comments
 (0)