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
|
||||
}
|
||||
|
||||
defer func() {
|
||||
_ = inv.TerminateSession(sessionID)
|
||||
}()
|
||||
|
||||
var shouldStop bool
|
||||
res := arr
|
||||
for !shouldStop {
|
||||
|
|
Loading…
Reference in a new issue