Skip to content

Commit 602be30

Browse files
committed
Do not unset DynamoDB Client on disconnect until implement reconnect method.
1 parent 524180e commit 602be30

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/Kitar/Dynamodb/Connection.php

+3-4
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ protected function createClient(array $config)
9191

9292
if (isset($config['key']) && isset($config['secret'])) {
9393
$dynamoConfig['credentials'] = Arr::only(
94-
$config, ['key', 'secret', 'token']
94+
$config,
95+
['key', 'secret', 'token']
9596
);
9697
}
9798

@@ -103,9 +104,7 @@ protected function createClient(array $config)
103104
*/
104105
public function disconnect()
105106
{
106-
unset($this->client);
107-
108-
$this->client = null;
107+
//
109108
}
110109

111110
/**

tests/ConnectionTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ public function it_returns_driver_name()
5050
}
5151

5252
/** @test */
53-
public function it_destroys_connection()
53+
public function it_keeps_dynamodb_client_on_disconnect()
5454
{
5555
$this->connection->disconnect();
5656

57-
$this->assertNull($this->connection->getClient());
57+
$this->assertNotNull($this->connection->getClient());
5858
}
5959

6060
/** @test */

0 commit comments

Comments
 (0)