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 {
127
127
"role" , "client" ,
128
128
"connection_id" , c .callbackContext .ConnectionId .String (),
129
129
)
130
+ // NOTE: this will be unlocked on BatchDone
130
131
c .busyMutex .Lock ()
131
132
c .blockUseCallback = true
132
133
msg := NewMsgRequestRange (start , end )
@@ -136,6 +137,7 @@ func (c *Client) GetBlockRange(start common.Point, end common.Point) error {
136
137
}
137
138
err , ok := <- c .startBatchResultChan
138
139
if ! ok {
140
+ c .busyMutex .Unlock ()
139
141
return protocol .ProtocolShuttingDownError
140
142
}
141
143
if err != nil {
@@ -155,6 +157,7 @@ func (c *Client) GetBlock(point common.Point) (ledger.Block, error) {
155
157
"role" , "client" ,
156
158
"connection_id" , c .callbackContext .ConnectionId .String (),
157
159
)
160
+ // NOTE: this will be unlocked on BatchDone
158
161
c .busyMutex .Lock ()
159
162
c .blockUseCallback = false
160
163
msg := NewMsgRequestRange (point , point )
You can’t perform that action at this time.
0 commit comments