mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
disconnect instruction
This commit is contained in:
@@ -575,16 +575,7 @@ function VNCClient(display) {
|
|||||||
&& currentState != STATE_DISCONNECTING) {
|
&& currentState != STATE_DISCONNECTING) {
|
||||||
|
|
||||||
setState(STATE_DISCONNECTING);
|
setState(STATE_DISCONNECTING);
|
||||||
|
sendMessage("disconnect;"); // End session
|
||||||
// Attempt disdisconnection
|
|
||||||
var disconnect_xmlhttprequest = new XMLHttpRequest();
|
|
||||||
disconnect_xmlhttprequest.open("GET", "disconnect", false);
|
|
||||||
disconnect_xmlhttprequest.send(null);
|
|
||||||
|
|
||||||
// Handle result (and check for errors)
|
|
||||||
var message = new GuacamoleMessage(disconnect_xmlhttprequest.responseXML);
|
|
||||||
handleErrors(message);
|
|
||||||
|
|
||||||
setState(STATE_DISCONNECTED);
|
setState(STATE_DISCONNECTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -167,6 +167,10 @@ void guac_start_client(guac_client* client) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if (strcmp(instruction.opcode, "disconnect") == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
} while ((retval = guac_read_instruction(io, &instruction)) > 0);
|
} while ((retval = guac_read_instruction(io, &instruction)) > 0);
|
||||||
|
|
||||||
if (retval < 0)
|
if (retval < 0)
|
||||||
|
Reference in New Issue
Block a user