[#XX] client: Terminate session in ReadIteratorItems
* Make an invoker terminate session by its ID before return, otherwise, it may lead to `max session capacity reached error`. Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
This commit is contained in:
parent
694daebb19
commit
e7a05a49ff
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