Skip to content

Commit

Permalink
Fix superfluous response when origin is wrong fixes #130
Browse files Browse the repository at this point in the history
  • Loading branch information
NHAS committed Nov 29, 2024
1 parent 0469808 commit 90c12c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/router/session_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func (c *Challenger) WS(w http.ResponseWriter, r *http.Request) {
_c, err := c.upgrader.Upgrade(w, r, nil)
if err != nil {
log.Println(user.Username, remoteAddress, "failed to create websocket:", err)
http.Error(w, "Server Error", http.StatusInternalServerError)
// do not error here as upgrade has already done it
return
}

Expand Down

0 comments on commit 90c12c5

Please sign in to comment.