chore: remove unused ScreenException methods for reconnect timer
This commit is contained in:
parent
7c00299b11
commit
ebab0eb62e
4 changed files with 2 additions and 31 deletions
|
|
@ -270,7 +270,6 @@ void ClientApp::closeClient(Client *client)
|
|||
|
||||
bool ClientApp::startClient()
|
||||
{
|
||||
double retryTime;
|
||||
deskflow::Screen *clientScreen = nullptr;
|
||||
try {
|
||||
if (m_clientScreen == nullptr) {
|
||||
|
|
@ -290,7 +289,6 @@ bool ClientApp::startClient()
|
|||
} catch (ScreenUnavailableException &e) {
|
||||
LOG_WARN("secondary screen unavailable: %s", e.what());
|
||||
closeClientScreen(clientScreen);
|
||||
retryTime = e.getRetryTime();
|
||||
} catch (ScreenOpenFailureException &e) {
|
||||
LOG_CRIT("failed to start client: %s", e.what());
|
||||
closeClientScreen(clientScreen);
|
||||
|
|
@ -301,7 +299,7 @@ bool ClientApp::startClient()
|
|||
return false;
|
||||
}
|
||||
|
||||
scheduleClientRestart(retryTime);
|
||||
scheduleClientRestart(s_retryTime);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,16 +21,6 @@ std::string ScreenOpenFailureException::getWhat() const throw()
|
|||
// ScreenUnavailableException
|
||||
//
|
||||
|
||||
ScreenUnavailableException::ScreenUnavailableException(double timeUntilRetry) : m_timeUntilRetry(timeUntilRetry)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
double ScreenUnavailableException::getRetryTime() const
|
||||
{
|
||||
return m_timeUntilRetry;
|
||||
}
|
||||
|
||||
std::string ScreenUnavailableException::getWhat() const throw()
|
||||
{
|
||||
return format("ScreenUnavailableException", "unable to open screen");
|
||||
|
|
|
|||
|
|
@ -37,27 +37,10 @@ may be successful.
|
|||
class ScreenUnavailableException : public ScreenOpenFailureException
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
\c timeUntilRetry is the suggested time the caller should wait until
|
||||
trying to open the screen again.
|
||||
*/
|
||||
explicit ScreenUnavailableException(double timeUntilRetry);
|
||||
~ScreenUnavailableException() throw() override = default;
|
||||
|
||||
//! @name manipulators
|
||||
//@{
|
||||
|
||||
//! Get retry time
|
||||
/*!
|
||||
Returns the suggested time to wait until retrying to open the screen.
|
||||
*/
|
||||
double getRetryTime() const;
|
||||
|
||||
//@}
|
||||
|
||||
protected:
|
||||
std::string getWhat() const throw() override;
|
||||
|
||||
private:
|
||||
double m_timeUntilRetry;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -837,7 +837,7 @@ Display *XWindowsScreen::openDisplay(const char *displayName)
|
|||
LOG_DEBUG2("calling XOpenDisplay(\"%s\")", displayName);
|
||||
Display *display = XOpenDisplay(displayName);
|
||||
if (display == nullptr) {
|
||||
throw ScreenUnavailableException(60.0);
|
||||
throw ScreenUnavailableException();
|
||||
}
|
||||
|
||||
// verify the availability of the XTest extension
|
||||
|
|
|
|||
Loading…
Reference in a new issue