Explorar el Código

fixed err: http: multiple response.WriteHeader calls

Mohamed Al Ashaal hace 7 años
padre
commit
7e5132e857
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  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)
 	})