Ignore http.RsponseWriter errors

This commit is contained in:
Ralph Slooten
2022-08-07 00:09:32 +12:00
parent f6ae6bbdbb
commit 788e390e01
5 changed files with 14 additions and 14 deletions

View File

@@ -133,5 +133,5 @@ func ServeWs(hub *Hub, w http.ResponseWriter, r *http.Request) {
func basicAuthResponse(w http.ResponseWriter) {
w.Header().Set("WWW-Authenticate", `Basic realm="Login"`)
w.WriteHeader(http.StatusUnauthorized)
w.Write([]byte("Unauthorised.\n"))
_, _ = w.Write([]byte("Unauthorised.\n"))
}