Commit 27982485 by Bach Dániel Committed by Guba Sándor

fix unhandled exceptions

parent b9fab27a
......@@ -65,7 +65,8 @@ class VNCWebSocketHandler(Protocol):
port = value['port']
host = value['host']
except:
pass
transport.loseConnection()
return
self.transport = transport
self.srv_queue = defer.DeferredQueue()
self.cli_queue = defer.DeferredQueue()
......@@ -87,7 +88,8 @@ class VNCWebSocketHandler(Protocol):
self.cli_queue.put(frame)
def connectionLost(self, why):
self.cli_queue.put(False)
if hasattr(self, 'cli_queue'):
self.cli_queue.put(False)
log.msg("HELO")
......
......@@ -399,7 +399,6 @@ class WebSocketsProtocol(Protocol):
Find frames in incoming data and pass them to the underlying protocol.
"""
for opcode, data, fin in _parseFrames(self._buffer):
self._receiver.frameReceived(opcode, base64.b64decode(data), fin)
if opcode == CONTROLS.CLOSE:
# The other side wants us to close.
code, reason = data
......@@ -416,6 +415,7 @@ class WebSocketsProtocol(Protocol):
# 5.5.3 PONGs must contain the data that was sent with the
# provoking PING.
self.transport.write(_makeFrame(data, CONTROLS.PONG, True))
self._receiver.frameReceived(opcode, base64.b64decode(data), fin)
def dataReceived(self, data):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment