client: Terminate session in ReadIteratorItems
#85
1 changed files with 4 additions and 0 deletions
|
@ -29,6 +29,10 @@ func ReadIteratorItems(inv Invoker, batchSize int, contract util.Uint160, method
|
||||||
return arr, nil
|
return arr, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defer func() {
|
||||||
|
_ = inv.TerminateSession(sessionID)
|
||||||
|
}()
|
||||||
|
|
||||||
var shouldStop bool
|
var shouldStop bool
|
||||||
res := arr
|
res := arr
|
||||||
for !shouldStop {
|
for !shouldStop {
|
||||||
|
|
Loading…
Reference in a new issue