From ac70c15248bdde8eaba25e004759959a86b79f69 Mon Sep 17 00:00:00 2001 From: rishabh-bector Date: Mon, 30 Jul 2018 09:23:55 -0500 Subject: [PATCH] TUN-828: Added Connection: keep-alive header --- origin/tunnel.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/origin/tunnel.go b/origin/tunnel.go index e0a0d5ad..6cdafd8f 100644 --- a/origin/tunnel.go +++ b/origin/tunnel.go @@ -545,6 +545,9 @@ func (h *TunnelHandler) ServeStream(stream *h2mux.MuxedStream) error { } } + // Request origin to keep connection alive to improve performance + req.Header.Set("Connection", "keep-alive") + response, err := h.httpClient.RoundTrip(req) if err != nil {