GUAC-1389: Document the frame wait timeout (no magic numbers).
This commit is contained in:
parent
967affa883
commit
7f0b0ab1ef
@ -38,6 +38,15 @@
|
|||||||
*/
|
*/
|
||||||
#define GUAC_VNC_FRAME_TIMEOUT 10
|
#define GUAC_VNC_FRAME_TIMEOUT 10
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The amount of time to wait for a new message from the VNC server when
|
||||||
|
* beginning a new frame. This value must be kept reasonably small such that
|
||||||
|
* a slow VNC server will not prevent external events from being handled (such
|
||||||
|
* as the stop signal from guac_client_stop()), but large enough that the
|
||||||
|
* message handling loop does not eat up CPU spinning.
|
||||||
|
*/
|
||||||
|
#define GUAC_VNC_FRAME_START_TIMEOUT 1000000
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The number of milliseconds to wait between connection attempts.
|
* The number of milliseconds to wait between connection attempts.
|
||||||
*/
|
*/
|
||||||
|
@ -341,7 +341,8 @@ void* guac_vnc_client_thread(void* data) {
|
|||||||
while (client->state == GUAC_CLIENT_RUNNING) {
|
while (client->state == GUAC_CLIENT_RUNNING) {
|
||||||
|
|
||||||
/* Wait for start of frame */
|
/* Wait for start of frame */
|
||||||
int wait_result = guac_vnc_wait_for_messages(rfb_client, 1000000);
|
int wait_result = guac_vnc_wait_for_messages(rfb_client,
|
||||||
|
GUAC_VNC_FRAME_START_TIMEOUT);
|
||||||
if (wait_result > 0) {
|
if (wait_result > 0) {
|
||||||
|
|
||||||
guac_timestamp frame_start = guac_timestamp_current();
|
guac_timestamp frame_start = guac_timestamp_current();
|
||||||
|
Loading…
Reference in New Issue
Block a user