fix: return after writing 500 http headers
Signed-off-by: HeshamTB <hishaminv@gmail.com>
This commit is contained in:
parent
fc458f1cda
commit
064fdfe180
2
main.go
2
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
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user