Skip to content

Commit

Permalink
Fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeniy-scherbina committed Apr 9, 2024
1 parent 533e48a commit e23cd48
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ issues:
- path: \.pb.go
linters:
- lll
- path: rpc/websockets.go
text: 'G114: Use of net/http serve function that has no support for setting timeouts'
max-same-issues: 50

linters-settings:
Expand Down
4 changes: 2 additions & 2 deletions rpc/websockets.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ func (s *websocketsServer) Start() {
var err error
/* #nosec G114 -- http functions have no support for timeouts */
if s.certFile == "" || s.keyFile == "" {
err = http.ListenAndServe(s.wsAddr, ws) /* #nosec G114 -- http functions have no support for timeouts */
err = http.ListenAndServe(s.wsAddr, ws)
} else {
err = http.ListenAndServeTLS(s.wsAddr, s.certFile, s.keyFile, ws) /* #nosec G114 -- http functions have no support for timeouts */
err = http.ListenAndServeTLS(s.wsAddr, s.certFile, s.keyFile, ws)
}

if err != nil {
Expand Down

0 comments on commit e23cd48

Please sign in to comment.