[editor] Fix: Upgrade contains a header send, error must not send headers

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2022-02-10 00:30:40 +01:00
parent 8cfd22c916
commit 0d9536ee3f
Signed by: luzifer
GPG Key ID: 0066F03ED215AD7D

View File

@ -135,7 +135,7 @@ func configEditorGlobalGetUser(w http.ResponseWriter, r *http.Request) {
func configEditorGlobalSubscribe(w http.ResponseWriter, r *http.Request) {
conn, err := upgrader.Upgrade(w, r, nil)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
log.WithError(err).Error("Unable to initialize websocket")
return
}
defer conn.Close()