File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -127,6 +127,7 @@ func (c *Client) GetBlockRange(start common.Point, end common.Point) error {
127127 "role" , "client" ,
128128 "connection_id" , c .callbackContext .ConnectionId .String (),
129129 )
130+ // NOTE: this will be unlocked on BatchDone
130131 c .busyMutex .Lock ()
131132 c .blockUseCallback = true
132133 msg := NewMsgRequestRange (start , end )
@@ -136,6 +137,7 @@ func (c *Client) GetBlockRange(start common.Point, end common.Point) error {
136137 }
137138 err , ok := <- c .startBatchResultChan
138139 if ! ok {
140+ c .busyMutex .Unlock ()
139141 return protocol .ProtocolShuttingDownError
140142 }
141143 if err != nil {
@@ -155,6 +157,7 @@ func (c *Client) GetBlock(point common.Point) (ledger.Block, error) {
155157 "role" , "client" ,
156158 "connection_id" , c .callbackContext .ConnectionId .String (),
157159 )
160+ // NOTE: this will be unlocked on BatchDone
158161 c .busyMutex .Lock ()
159162 c .blockUseCallback = false
160163 msg := NewMsgRequestRange (point , point )
You can’t perform that action at this time.
0 commit comments