Skip to content

Commit 70a5a5a

Browse files
authored
Merge pull request #98 from Sh4d1/fix_panic_no_backend
add a missing return on error
2 parents ff5e07c + 4ef1b60 commit 70a5a5a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pkg/server/tunnel.go

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ func (t *Tunnel) ServeHTTP(w http.ResponseWriter, r *http.Request) {
7777
backend, err := t.Server.BackendManager.Backend()
7878
if err != nil {
7979
http.Error(w, fmt.Sprintf("currently no tunnels available: %v", err), http.StatusInternalServerError)
80+
return
8081
}
8182
if err := backend.Send(dialRequest); err != nil {
8283
klog.Errorf("failed to tunnel dial request %v", err)

0 commit comments

Comments
 (0)