Skip to content

Commit

Permalink
Merge pull request #2890 from jmprusi/jmprusi/tunnel_retry
Browse files Browse the repository at this point in the history
🐛 tunneler: return retry-after when dialer not ready
  • Loading branch information
openshift-merge-robot authored Mar 14, 2023
2 parents bf1d290 + 46f7245 commit 46aed50
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/tunneler/podsubresourceproxy_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,8 @@ func podSubresourceURL(downstreamNamespaceName, podName, subresource string) (*u
func (tn *tunneler) Proxy(clusterName logicalcluster.Name, syncerName string, rw http.ResponseWriter, req *http.Request) {
d := tn.getDialer(clusterName, syncerName)
if d == nil || isClosedChan(d.Done()) {
http.Error(rw, "syncer tunnels: tunnel closed", http.StatusInternalServerError)
rw.Header().Set("Retry-After", "1")
http.Error(rw, "syncer tunnels: tunnel closed", http.StatusServiceUnavailable)
return
}

Expand Down

0 comments on commit 46aed50

Please sign in to comment.