Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
noVNC
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
noVNC
Commits
4043d8bb
Commit
4043d8bb
authored
Feb 26, 2015
by
Samuel
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #458 from kanaka/bug/disconnect
Fix disconnect/reconnect issues
parents
2ec29db7
e543525f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
10 deletions
+26
-10
rfb.js
include/rfb.js
+1
-0
ui.js
include/ui.js
+25
-10
No files found.
include/rfb.js
View file @
4043d8bb
...
@@ -482,6 +482,7 @@ var RFB;
...
@@ -482,6 +482,7 @@ var RFB;
Util
.
Debug
(
"Clearing disconnect timer"
);
Util
.
Debug
(
"Clearing disconnect timer"
);
clearTimeout
(
this
.
_disconnTimer
);
clearTimeout
(
this
.
_disconnTimer
);
this
.
_disconnTimer
=
null
;
this
.
_disconnTimer
=
null
;
this
.
_sock
.
off
(
'close'
);
// make sure we don't get a double event
}
}
switch
(
state
)
{
switch
(
state
)
{
...
...
include/ui.js
View file @
4043d8bb
...
@@ -110,13 +110,7 @@ var UI;
...
@@ -110,13 +110,7 @@ var UI;
UI
.
initSetting
(
'path'
,
'websockify'
);
UI
.
initSetting
(
'path'
,
'websockify'
);
UI
.
initSetting
(
'repeaterID'
,
''
);
UI
.
initSetting
(
'repeaterID'
,
''
);
UI
.
rfb
=
new
RFB
({
'target'
:
$D
(
'noVNC_canvas'
),
UI
.
initRFB
();
'onUpdateState'
:
UI
.
updateState
,
'onXvpInit'
:
UI
.
updateXvpVisualState
,
'onClipboard'
:
UI
.
clipReceive
,
'onFBUComplete'
:
UI
.
FBUComplete
,
'onFBResize'
:
UI
.
updateViewDragButton
,
'onDesktopName'
:
UI
.
updateDocumentTitle
});
var
autoconnect
=
WebUtil
.
getQueryVar
(
'autoconnect'
,
false
);
var
autoconnect
=
WebUtil
.
getQueryVar
(
'autoconnect'
,
false
);
if
(
autoconnect
===
'true'
||
autoconnect
==
'1'
)
{
if
(
autoconnect
===
'true'
||
autoconnect
==
'1'
)
{
...
@@ -192,6 +186,16 @@ var UI;
...
@@ -192,6 +186,16 @@ var UI;
}
}
},
},
initRFB
:
function
()
{
UI
.
rfb
=
new
RFB
({
'target'
:
$D
(
'noVNC_canvas'
),
'onUpdateState'
:
UI
.
updateState
,
'onXvpInit'
:
UI
.
updateXvpVisualState
,
'onClipboard'
:
UI
.
clipReceive
,
'onFBUComplete'
:
UI
.
FBUComplete
,
'onFBResize'
:
UI
.
updateViewDragButton
,
'onDesktopName'
:
UI
.
updateDocumentTitle
});
},
addMouseHandlers
:
function
()
{
addMouseHandlers
:
function
()
{
// Setup interface handlers that can't be inline
// Setup interface handlers that can't be inline
$D
(
"noVNC_view_drag_button"
).
onclick
=
UI
.
setViewDrag
;
$D
(
"noVNC_view_drag_button"
).
onclick
=
UI
.
setViewDrag
;
...
@@ -602,6 +606,13 @@ var UI;
...
@@ -602,6 +606,13 @@ var UI;
break
;
break
;
}
}
switch
(
state
)
{
case
'fatal'
:
case
'failed'
:
case
'disconnected'
:
UI
.
initRFB
();
}
if
(
typeof
(
msg
)
!==
'undefined'
)
{
if
(
typeof
(
msg
)
!==
'undefined'
)
{
$D
(
'noVNC-control-bar'
).
setAttribute
(
"class"
,
klass
);
$D
(
'noVNC-control-bar'
).
setAttribute
(
"class"
,
klass
);
$D
(
'noVNC_status'
).
innerHTML
=
msg
;
$D
(
'noVNC_status'
).
innerHTML
=
msg
;
...
@@ -654,8 +665,13 @@ var UI;
...
@@ -654,8 +665,13 @@ var UI;
switch
(
UI
.
rfb_state
)
{
switch
(
UI
.
rfb_state
)
{
case
'fatal'
:
case
'fatal'
:
case
'failed'
:
case
'failed'
:
case
'loaded'
:
case
'disconnected'
:
case
'disconnected'
:
$D
(
'connectButton'
).
style
.
display
=
""
;
$D
(
'disconnectButton'
).
style
.
display
=
"none"
;
UI
.
connSettingsOpen
=
false
;
UI
.
toggleConnectPanel
();
break
;
case
'loaded'
:
$D
(
'connectButton'
).
style
.
display
=
""
;
$D
(
'connectButton'
).
style
.
display
=
""
;
$D
(
'disconnectButton'
).
style
.
display
=
"none"
;
$D
(
'disconnectButton'
).
style
.
display
=
"none"
;
break
;
break
;
...
@@ -736,8 +752,7 @@ var UI;
...
@@ -736,8 +752,7 @@ var UI;
UI
.
rfb
.
set_onFBUComplete
(
UI
.
FBUComplete
);
UI
.
rfb
.
set_onFBUComplete
(
UI
.
FBUComplete
);
$D
(
'noVNC_logo'
).
style
.
display
=
"block"
;
$D
(
'noVNC_logo'
).
style
.
display
=
"block"
;
UI
.
connSettingsOpen
=
false
;
// Don't display the connection settings until we're actually disconnected
UI
.
toggleConnectPanel
();
},
},
displayBlur
:
function
()
{
displayBlur
:
function
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment