[X2Go-Commits] [x2goclient] 01/01: Reconnect ssh broker in case of IO Error.
git-admin at x2go.org
git-admin at x2go.org
Wed Dec 2 15:18:03 CET 2015
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository x2goclient.
commit a929156d922a5157af66f3f08074a0cb0a3532c3
Author: Oleksandr Shneyder <o.shneyder at phoca-gmbh.de>
Date: Wed Dec 2 15:17:51 2015 +0100
Reconnect ssh broker in case of IO Error.
---
debian/changelog | 1 +
src/httpbrokerclient.cpp | 12 ++++++++++++
src/httpbrokerclient.h | 1 +
3 files changed, 14 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 8e1b001..505cbca 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,6 +15,7 @@ x2goclient (4.0.5.1-0x2go1) UNRELEASED; urgency=low
- Fix direct RDP in broker mode.
- Fix crashing client when editing session from SessionManageDialog.
- Configure audio input in pulseaudio on Windows.
+ - Reconnect ssh broker in case of IO Error.
[ Mike Gabriel ]
* New upstream release (4.0.5.1):
diff --git a/src/httpbrokerclient.cpp b/src/httpbrokerclient.cpp
index 4f40191..554e1c0 100644
--- a/src/httpbrokerclient.cpp
+++ b/src/httpbrokerclient.cpp
@@ -97,6 +97,8 @@ void HttpBrokerClient::createSshConnection()
connect ( sshConnection, SIGNAL ( userAuthError ( QString ) ),this,SLOT ( slotSshUserAuthError ( QString ) ) );
connect ( sshConnection, SIGNAL ( connectionError(QString,QString)), this,
SLOT ( slotSshConnectionError ( QString,QString ) ) );
+ connect ( sshConnection, SIGNAL(ioErr(SshProcess*,QString,QString)), this,
+ SLOT(slotSshIoErr(SshProcess*,QString,QString)));
sshConnection->start();
}
@@ -668,3 +670,13 @@ QString HttpBrokerClient::getHexVal ( const QByteArray& ba )
return val.join ( ":" );
}
+void HttpBrokerClient::slotSshIoErr(SshProcess* caller, QString error, QString lastSessionError)
+{
+ x2goDebug<<"Brocker SSH Connection IO Error, reconnect session\n";
+ if ( sshConnection )
+ {
+ delete sshConnection;
+ sshConnection=0l;
+ }
+ createSshConnection();
+}
diff --git a/src/httpbrokerclient.h b/src/httpbrokerclient.h
index da3ff4f..f19316b 100644
--- a/src/httpbrokerclient.h
+++ b/src/httpbrokerclient.h
@@ -78,6 +78,7 @@ private slots:
void slotSelectSession ( bool success, QString answer, int pid);
void slotPassChanged ( bool success, QString answer, int pid);
void slotConnectionTest( bool success, QString answer, int pid);
+ void slotSshIoErr(SshProcess* caller, QString error, QString lastSessionError);
public slots:
void getUserSessions();
--
Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
More information about the x2go-commits
mailing list