Skip to content

Commit

Permalink
Don't reconnect on DuplicateKeyExceptions and don't log them (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
rgooding authored Apr 18, 2018
1 parent 47ec4b8 commit 3ab581a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Ql/AbstractQlConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -417,11 +417,11 @@ protected function _performWithRetries(
}
else
{
$this->disconnect();
error_log(
'Connection Error: (' . $exception->getCode() . ') '
. $exception->getMessage()
);
if(!($exception instanceof DuplicateKeyException))
{
$this->disconnect();
error_log('Connection Error: (' . $exception->getCode() . ') ' . $exception->getMessage());
}
throw $exception;
}
}
Expand Down

0 comments on commit 3ab581a

Please sign in to comment.