mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
Temporary workaround to fix session issue - will be academic once handoff is implemented
This commit is contained in:
@@ -63,6 +63,11 @@ public class InstructionStream extends GuacamoleServlet {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (message == null) {
|
||||||
|
session.disconnect();
|
||||||
|
throw new GuacamoleException("Disconnected.");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (GuacamoleException e) {
|
catch (GuacamoleException e) {
|
||||||
out.write("error:" + e.getMessage() + ";");
|
out.write("error:" + e.getMessage() + ";");
|
||||||
|
@@ -576,14 +576,23 @@ function VNCClient(display) {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
function disconnect() {
|
function disconnect() {
|
||||||
|
|
||||||
// Only attempt disconnection not disconnected.
|
// Only attempt disconnection not disconnected.
|
||||||
if (currentState != STATE_DISCONNECTED
|
if (currentState != STATE_DISCONNECTED
|
||||||
&& currentState != STATE_DISCONNECTING) {
|
&& currentState != STATE_DISCONNECTING) {
|
||||||
|
|
||||||
|
var message = "disconnect;";
|
||||||
setState(STATE_DISCONNECTING);
|
setState(STATE_DISCONNECTING);
|
||||||
sendMessage("disconnect;"); // End session
|
|
||||||
|
// Send disconnect message (synchronously... as necessary until handoff is implemented)
|
||||||
|
var disconnect_xmlhttprequest = new XMLHttpRequest();
|
||||||
|
disconnect_xmlhttprequest.open("POST", "inbound", false);
|
||||||
|
disconnect_xmlhttprequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
||||||
|
disconnect_xmlhttprequest.setRequestHeader("Content-length", message.length);
|
||||||
|
disconnect_xmlhttprequest.send(message);
|
||||||
|
|
||||||
setState(STATE_DISCONNECTED);
|
setState(STATE_DISCONNECTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user