mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-08 14:41:57 +08:00
removed restart function from platform. no longer trying to
restart if the X server connection was lost; since synergy is likely to be started by xdm or the user's xsession, it's better for synergy to simply terminate when the connection is lost. synergy will still restart due to other errors. also fixed numerous other minor bugs and cleaned some stuff up (like app error codes are now consistent and enumerated in Version.h, for lack of a better place). and boosted version and protocol numbers.
This commit is contained in:
@@ -127,7 +127,6 @@ CClient::open()
|
||||
}
|
||||
catch (XScreenOpenFailure&) {
|
||||
// can't open screen yet. wait a few seconds to retry.
|
||||
CThread::sleep(3.0);
|
||||
log((CLOG_INFO "failed to open screen"));
|
||||
return false;
|
||||
}
|
||||
@@ -360,7 +359,15 @@ CClient::openSecondaryScreen()
|
||||
m_screen = new CXWindowsSecondaryScreen(this);
|
||||
#endif
|
||||
log((CLOG_DEBUG1 "opening secondary screen"));
|
||||
m_screen->open();
|
||||
try {
|
||||
m_screen->open();
|
||||
}
|
||||
catch (...) {
|
||||
log((CLOG_DEBUG1 "destroying secondary screen"));
|
||||
delete m_screen;
|
||||
m_screen = NULL;
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@@ -472,7 +479,9 @@ CClient::runServer()
|
||||
log((CLOG_INFO "connected to server"));
|
||||
break;
|
||||
}
|
||||
catch (XSocketConnect&) {
|
||||
catch (XSocketConnect& e) {
|
||||
log((CLOG_DEBUG1 "failed to connect to server: %s", e.getErrstr()));
|
||||
|
||||
// failed to connect. if not camping then rethrow.
|
||||
if (!m_camp) {
|
||||
throw;
|
||||
|
||||
Reference in New Issue
Block a user