From 81bcf70fdcda0c413e3358efa09013d130def47e Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Tue, 22 Mar 2011 14:24:55 -0500 Subject: [PATCH] Higher connectTimeout default with web-socket-js. Current timeout is 2 seconds for connect timeout. Use 5 seconds if web-socket-js (Flash WebSockets emulator) is being used. On Windows XP with Flash 10.2.152.26, connecting seems to take quite a bit longer than it probably should. This should make it work more consistently. --- include/rfb.js | 6 +++++- include/vnc.js | 3 --- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/rfb.js b/include/rfb.js index 680dc7d5..b265a1fe 100644 --- a/include/rfb.js +++ b/include/rfb.js @@ -129,7 +129,11 @@ cdef('true_color', 'bool', true, 'Request true color pixel data'); cdef('local_cursor', 'bool', false, 'Request locally rendered cursor'); cdef('shared', 'bool', true, 'Request shared mode'); -cdef('connectTimeout', 'int', 2, 'Time (s) to wait for connection'); +if (Websock_native) { + cdef('connectTimeout', 'int', 2, 'Time (s) to wait for connection'); +} else { + cdef('connectTimeout', 'int', 5, 'Time (s) to wait for connection'); +} cdef('disconnectTimeout', 'int', 3, 'Time (s) to wait for disconnection'); cdef('check_rate', 'int', 217, 'Timing (ms) of send/receive check'); cdef('fbu_req_rate', 'int', 1413, 'Timing (ms) of frameBufferUpdate requests'); diff --git a/include/vnc.js b/include/vnc.js index f7f83cea..9f1b371f 100644 --- a/include/vnc.js +++ b/include/vnc.js @@ -10,9 +10,6 @@ /*jslint evil: true */ /*global window, document, INCLUDE_URI */ -// Globals defined here -var VNC_native_ws, WEB_SOCKET_SWF_LOCATION; - /* * Load supporting scripts */