mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-07 06:03:40 +08:00
synergy hook DLL will now restart itself if a client tries to
init() it while it's already running. fixed an uninitialized pointer bug in CServer and some cleanup-on-error code in CMSWindowsPrimaryScreen. also added timeout to read() on IInputStream and a heartbeat sent by clients so the server can disconnect clients that are dead but never reset the TCP connection. previously the server would keep these dead clients around forever and if the user was locked on the client screen for some reason then the server would have to be rebooted (or the server would have to be killed via a remote login).
This commit is contained in:
@@ -386,21 +386,27 @@ CMSWindowsPrimaryScreen::onOpenDisplay()
|
||||
// initialize hook library
|
||||
m_init(m_threadID);
|
||||
|
||||
// install the screen saver hook
|
||||
if (m_installScreenSaver != NULL) {
|
||||
m_installScreenSaver();
|
||||
}
|
||||
try {
|
||||
// install the screen saver hook
|
||||
if (m_installScreenSaver != NULL) {
|
||||
m_installScreenSaver();
|
||||
}
|
||||
|
||||
// get the input desktop and switch to it
|
||||
if (m_is95Family) {
|
||||
if (!openDesktop()) {
|
||||
throw XScreenOpenFailure();
|
||||
// get the input desktop and switch to it
|
||||
if (m_is95Family) {
|
||||
if (!openDesktop()) {
|
||||
throw XScreenOpenFailure();
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!switchDesktop(openInputDesktop())) {
|
||||
throw XScreenOpenFailure();
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!switchDesktop(openInputDesktop())) {
|
||||
throw XScreenOpenFailure();
|
||||
}
|
||||
catch (...) {
|
||||
m_cleanup();
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user