From 064fdfe1800dc60d45059bb5393d99e19a9893d6 Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Sat, 22 Jun 2024 22:05:52 +0300 Subject: [PATCH] fix: return after writing 500 http headers Signed-off-by: HeshamTB --- main.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.go b/main.go index 5e93e03..a6a6f76 100644 --- a/main.go +++ b/main.go @@ -60,12 +60,14 @@ func handleRoot(w http.ResponseWriter, r *http.Request) { if err != nil { log.Println(err.Error()) w.WriteHeader(http.StatusInternalServerError) + return } err = writeFormattedIP(w, Type, ip) if err != nil { log.Println(err.Error()) w.WriteHeader(http.StatusInternalServerError) + return } }