Skip to content

Commit

Permalink
rpcclient: remove redundant params used in handleSendPostMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
yyforyongyu committed Aug 30, 2023
1 parent 6c631e8 commit 562c8b3
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions rpcclient/infrastructure.go
Original file line number Diff line number Diff line change
Expand Up @@ -770,9 +770,7 @@ out:
// handleSendPostMessage handles performing the passed HTTP request, reading the
// result, unmarshalling it, and delivering the unmarshalled result to the
// provided response channel.
func (c *Client) handleSendPostMessage(jReq *jsonRequest,
shutdown chan struct{}) {

func (c *Client) handleSendPostMessage(jReq *jsonRequest) {
protocol := "http"
if !c.config.DisableTLS {
protocol = "https"
Expand Down Expand Up @@ -834,7 +832,7 @@ func (c *Client) handleSendPostMessage(jReq *jsonRequest,
select {
case <-time.After(backoff):

case <-shutdown:
case <-c.shutdown:
return
}
}
Expand Down Expand Up @@ -961,7 +959,7 @@ func (c *Client) sendPostHandler() {
}
}

c.handleSendPostMessage(req, c.shutdown)
c.handleSendPostMessage(req)
}

out:
Expand All @@ -978,9 +976,7 @@ out:
// For high priority messages we'll process
// them in goroutines to priorize them.
eg.Go(func() error {
c.handleSendPostMessage(
jReq, c.shutdown,
)
c.handleSendPostMessage(jReq)

return nil
})
Expand Down Expand Up @@ -1008,7 +1004,6 @@ cleanup:
}
c.wg.Done()
log.Tracef("RPC client send handler done for %s", c.config.Host)

}

// sendPostRequest sends the passed HTTP request to the RPC server using the
Expand Down

0 comments on commit 562c8b3

Please sign in to comment.