diff --git a/src/protocols/rdp/client.c b/src/protocols/rdp/client.c index 9cd936a9..c815af33 100644 --- a/src/protocols/rdp/client.c +++ b/src/protocols/rdp/client.c @@ -676,7 +676,7 @@ int guac_client_init(guac_client* client, int argc, char** argv) { guac_protocol_send_error(client->socket, "Error connecting to RDP server", - GUAC_PROTOCOL_STATUS_SERVER_ERROR); + GUAC_PROTOCOL_STATUS_UPSTREAM_ERROR); guac_socket_flush(client->socket); guac_error = GUAC_STATUS_BAD_STATE; diff --git a/src/protocols/rdp/guac_handlers.c b/src/protocols/rdp/guac_handlers.c index fcc25e2f..830ea36e 100644 --- a/src/protocols/rdp/guac_handlers.c +++ b/src/protocols/rdp/guac_handlers.c @@ -261,8 +261,12 @@ int rdp_guac_client_handle_messages(guac_client* client) { } /* 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; + } /* Success */ return 0;