Skip to content

Commit 60ff731

Browse files
authored
Merge pull request #90 from ydb-platform/update-MemorySessionPool
Update destructor in MemorySessionPool.php
2 parents bf24f8b + d0aae5b commit 60ff731

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
* update destructor in MemorySessionPool
12
* fixed exception on re-create server nodes
23
* fixed key name in createTable function
34
* added simple std looger

src/Sessions/MemorySessionPool.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,13 @@ public function __construct(Retry &$retry)
2525
*/
2626
public function __destruct()
2727
{
28-
foreach (static::$sessions as $session_id => $session)
29-
{
30-
if (static::$retry==null){
31-
static::$retry = new Retry();
28+
foreach (static::$sessions as $session_id => $session) {
29+
try {
30+
static::$retry->retry(function () use ($session) {
31+
$session->delete();
32+
}, true);
33+
} catch (\Exception $e) {
3234
}
33-
static::$retry->retry(function () use ($session) {
34-
$session->delete();
35-
},true);
3635
}
3736
}
3837

0 commit comments

Comments
 (0)