GUAC-556: Send UPSTREAM_ERROR for unexpected disconnect and failure to connect in RDP.
This commit is contained in:
parent
fdf2036cfe
commit
bd40dd30b2
@ -676,7 +676,7 @@ int guac_client_init(guac_client* client, int argc, char** argv) {
|
|||||||
|
|
||||||
guac_protocol_send_error(client->socket,
|
guac_protocol_send_error(client->socket,
|
||||||
"Error connecting to RDP server",
|
"Error connecting to RDP server",
|
||||||
GUAC_PROTOCOL_STATUS_SERVER_ERROR);
|
GUAC_PROTOCOL_STATUS_UPSTREAM_ERROR);
|
||||||
guac_socket_flush(client->socket);
|
guac_socket_flush(client->socket);
|
||||||
|
|
||||||
guac_error = GUAC_STATUS_BAD_STATE;
|
guac_error = GUAC_STATUS_BAD_STATE;
|
||||||
|
@ -261,8 +261,12 @@ int rdp_guac_client_handle_messages(guac_client* client) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* If an error occurred, fail */
|
/* If an error occurred, fail */
|
||||||
if (wait_result < 0)
|
if (wait_result < 0) {
|
||||||
|
guac_protocol_send_error(client->socket, "Connection closed.",
|
||||||
|
GUAC_PROTOCOL_STATUS_UPSTREAM_ERROR);
|
||||||
|
guac_socket_flush(client->socket);
|
||||||
return 1;
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* Success */
|
/* Success */
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user