Skip to content

Commit

Permalink
remove func() from defer
Browse files Browse the repository at this point in the history
Co-authored-by: Daniil Ankushin <ankushin.daniil42@gmail.com>
Signed-off-by: Ng Wei Han <47109095+weiihann@users.noreply.github.com>
  • Loading branch information
weiihann and AnkushinDaniil authored Feb 5, 2025
1 parent a566166 commit da54207
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions jsonrpc/websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,7 @@ func (ws *Websocket) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}

// Ensure we decrease the connection count when the connection closes
defer func() {
ws.connCount.Add(-1)
}()
defer ws.connCount.Add(-1)

// TODO include connection information, such as the remote address, in the logs.

Expand Down

0 comments on commit da54207

Please sign in to comment.