Skip to content
Snippets Groups Projects
Commit 2870d2d9 authored by Markus Klein's avatar Markus Klein Committed by Stefan Neufeind
Browse files

[TASK] DatabaseConnection::isConnected() should use ping()

In some rare cases the database connection might be down, but
DatabaseConnection still has isConnected set to TRUE.
A call to isConnected() simply returns the member variable's value.

Improve the getter to also ping() the database if the class thinks
it is connected to verify the connection state.

The other methods of the class will still use the member variable
and not the getter method to avoid a ping() to the database on every
database interaction.

Resolves: #54323
Releases: 6.2, 6.1
Change-Id: I6bf090e5ab5f1d5539319ff10a1fb224036c4634
Reviewed-on: https://review.typo3.org/26447
Reviewed-by: Bill Dagou
Tested-by: Bill Dagou
Reviewed-by: Wouter Wolters
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
parent 707b0106
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment