disconnect instruction

This commit is contained in:
Michael Jumper
2010-09-17 22:26:28 -07:00
parent 60d78e22c7
commit 0fa7530fd5
2 changed files with 5 additions and 10 deletions

View File

@@ -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);
} }

View File

@@ -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)