mirror of
https://github.com/bitechdev/ResolveSpec.git
synced 2026-10-02 11:31:57 +00:00
chore(gosec): enable gosec and address findings
This commit is contained in:
@@ -304,7 +304,7 @@ func (c *Connection) Close() {
|
||||
c.cancel()
|
||||
}
|
||||
if c.ws != nil {
|
||||
c.ws.Close()
|
||||
c.ws.Close() //nolint:gosec // G104: best-effort call, error intentionally ignored
|
||||
}
|
||||
|
||||
// Clean up subscriptions
|
||||
|
||||
@@ -110,7 +110,7 @@ func (h *Handler) HandleWebSocket(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
if err := h.hooks.Execute(BeforeConnect, hookCtx); err != nil {
|
||||
logger.Error("[WebSocketSpec] BeforeConnect hook failed: %v", err)
|
||||
ws.Close()
|
||||
ws.Close() //nolint:gosec // G104: best-effort call, error intentionally ignored
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user