fix(Data::SQLChannel): remove SQLChannel::close() parameter (hides virtual from parent) #4230

This commit is contained in:
Aleksandar Fabijanic 2023-11-01 11:26:29 +01:00
parent 8de0033591
commit b1e7b9ff3b
2 changed files with 7 additions and 7 deletions

View File

@ -106,7 +106,7 @@ public:
/// Opens the SQLChannel. /// Opens the SQLChannel.
/// Returns true if succesful. /// Returns true if succesful.
void close(int ms = 0); void close();
/// Closes the SQLChannel. /// Closes the SQLChannel.
void run(); void run();

View File

@ -110,7 +110,7 @@ SQLChannel::~SQLChannel()
try try
{ {
stop(); stop();
close(_timeout); close();
wait(); wait();
if (_pFileChannel) if (_pFileChannel)
_pFileChannel->close(); _pFileChannel->close();
@ -170,9 +170,9 @@ void SQLChannel::open()
} }
void SQLChannel::close(int ms) void SQLChannel::close()
{ {
wait(ms); wait(_timeout);
_pSession = nullptr; _pSession = nullptr;
} }
@ -237,7 +237,7 @@ void SQLChannel::run()
{ {
if (_reconnect) if (_reconnect)
{ {
close(_timeout); close();
open(); open();
_reconnect = _pSession.isNull(); _reconnect = _pSession.isNull();
if (_reconnect && sleepTime < 12800) if (_reconnect && sleepTime < 12800)
@ -591,7 +591,7 @@ size_t SQLChannel::execSQL()
_logger.error(ex.displayText()); _logger.error(ex.displayText());
if (!_file.empty()) if (!_file.empty())
n = logTofile(_pFileChannel, _file); n = logTofile(_pFileChannel, _file);
close(_timeout); close();
_reconnect = true; _reconnect = true;
} }
catch (std::exception& ex) catch (std::exception& ex)
@ -599,7 +599,7 @@ size_t SQLChannel::execSQL()
_logger.error(ex.what()); _logger.error(ex.what());
if (!_file.empty()) if (!_file.empty())
n = logTofile(_pFileChannel, _file); n = logTofile(_pFileChannel, _file);
close(_timeout); close();
_reconnect = true; _reconnect = true;
} }
} }