Parcourir la source

fixed err: http: multiple response.WriteHeader calls

Mohamed Al Ashaal il y a 7 ans
Parent
commit
7e5132e857
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      server.go

+ 1 - 0
server.go

@@ -45,6 +45,7 @@ func ServeHTTP() http.Handler {
 				loadbalancer.UpsertServer(testutils.ParseURI(upstream))
 			}
 			loadbalancer.ServeHTTP(res, req)
+			return
 		}
 		http.Error(res, "The request domain couldn't be found here", http.StatusNotImplemented)
 	})