Skip to content

Commit

Permalink
fixing conflict
Browse files Browse the repository at this point in the history
Signed-off-by: Chengxuan Xing <chengxuan.xing@kaleido.io>
  • Loading branch information
Chengxuan committed Mar 14, 2023
1 parent 00fc866 commit ced163f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkg/rpcbackend/backend.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2022 Kaleido, Inc.
// Copyright © 2023 Kaleido, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -71,6 +71,10 @@ type RPCClient struct {
requestCounter int64
}

type RPCClientOptions struct {
MaxConcurrentRequest int64
}

type RPCRequest struct {
JSONRpc string `json:"jsonrpc"`
ID *fftypes.JSONAny `json:"id"`
Expand Down Expand Up @@ -141,15 +145,12 @@ func (rc *RPCClient) CallRPC(ctx context.Context, result interface{}, method str
// In all return paths *including error paths* the RPCResponse is populated
// so the caller has an RPC structure to send back to the front-end caller.
func (rc *RPCClient) SyncRequest(ctx context.Context, rpcReq *RPCRequest) (rpcRes *RPCResponse, err error) {
<<<<<<< Updated upstream
=======
if rc.concurrencySlots != nil {
rc.concurrencySlots <- true
defer func() {
<-rc.concurrencySlots
}()
}
>>>>>>> Stashed changes

// We always set the back-end request ID - as we need to support requests coming in from
// multiple concurrent clients on our front-end that might use clashing IDs.
Expand Down

0 comments on commit ced163f

Please sign in to comment.