Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
vncproxy
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
27982485
authored
Oct 21, 2013
by
Bach Dániel
Committed by
Guba Sándor
Oct 21, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix unhandled exceptions
parent
b9fab27a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
proxy.py
+4
-2
websockets.py
+1
-1
No files found.
proxy.py
View file @
27982485
...
@@ -65,7 +65,8 @@ class VNCWebSocketHandler(Protocol):
...
@@ -65,7 +65,8 @@ class VNCWebSocketHandler(Protocol):
port
=
value
[
'port'
]
port
=
value
[
'port'
]
host
=
value
[
'host'
]
host
=
value
[
'host'
]
except
:
except
:
pass
transport
.
loseConnection
()
return
self
.
transport
=
transport
self
.
transport
=
transport
self
.
srv_queue
=
defer
.
DeferredQueue
()
self
.
srv_queue
=
defer
.
DeferredQueue
()
self
.
cli_queue
=
defer
.
DeferredQueue
()
self
.
cli_queue
=
defer
.
DeferredQueue
()
...
@@ -87,7 +88,8 @@ class VNCWebSocketHandler(Protocol):
...
@@ -87,7 +88,8 @@ class VNCWebSocketHandler(Protocol):
self
.
cli_queue
.
put
(
frame
)
self
.
cli_queue
.
put
(
frame
)
def
connectionLost
(
self
,
why
):
def
connectionLost
(
self
,
why
):
self
.
cli_queue
.
put
(
False
)
if
hasattr
(
self
,
'cli_queue'
):
self
.
cli_queue
.
put
(
False
)
log
.
msg
(
"HELO"
)
log
.
msg
(
"HELO"
)
...
...
websockets.py
View file @
27982485
...
@@ -399,7 +399,6 @@ class WebSocketsProtocol(Protocol):
...
@@ -399,7 +399,6 @@ class WebSocketsProtocol(Protocol):
Find frames in incoming data and pass them to the underlying protocol.
Find frames in incoming data and pass them to the underlying protocol.
"""
"""
for
opcode
,
data
,
fin
in
_parseFrames
(
self
.
_buffer
):
for
opcode
,
data
,
fin
in
_parseFrames
(
self
.
_buffer
):
self
.
_receiver
.
frameReceived
(
opcode
,
base64
.
b64decode
(
data
),
fin
)
if
opcode
==
CONTROLS
.
CLOSE
:
if
opcode
==
CONTROLS
.
CLOSE
:
# The other side wants us to close.
# The other side wants us to close.
code
,
reason
=
data
code
,
reason
=
data
...
@@ -416,6 +415,7 @@ class WebSocketsProtocol(Protocol):
...
@@ -416,6 +415,7 @@ class WebSocketsProtocol(Protocol):
# 5.5.3 PONGs must contain the data that was sent with the
# 5.5.3 PONGs must contain the data that was sent with the
# provoking PING.
# provoking PING.
self
.
transport
.
write
(
_makeFrame
(
data
,
CONTROLS
.
PONG
,
True
))
self
.
transport
.
write
(
_makeFrame
(
data
,
CONTROLS
.
PONG
,
True
))
self
.
_receiver
.
frameReceived
(
opcode
,
base64
.
b64decode
(
data
),
fin
)
def
dataReceived
(
self
,
data
):
def
dataReceived
(
self
,
data
):
...
...
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