Skip to content

Commit

Permalink
rpcclient: fix comment nits
Browse files Browse the repository at this point in the history
- delete TODO related to clearing batch list;
- refine comment for code when batchList len is 0
  • Loading branch information
ynewmann committed Nov 25, 2024
1 parent b3d9947 commit a8cddef
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions rpcclient/infrastructure.go
Original file line number Diff line number Diff line change
Expand Up @@ -1669,7 +1669,7 @@ func (c *Client) sendAsync() (FutureGetBulkResult, error) {
c.batchLock.Lock()
defer c.batchLock.Unlock()

// if batchlist is empty, there's nothing to send
// If batchList is empty, there's nothing to send.
if c.batchList.Len() == 0 {
return nil, ErrEmptyBatch
}
Expand Down Expand Up @@ -1709,10 +1709,6 @@ func (c *Client) Send() error {
batchResp, err := future.Receive()
if err != nil {
// Clear batchlist in case of an error.
//
// TODO(yy): need to double check to make sure there's no
// concurrent access to this batch list, otherwise we may miss
// some batched requests.

c.batchLock.Lock()
c.batchList = list.New()
Expand Down

0 comments on commit a8cddef

Please sign in to comment.