Skip to content

Commit

Permalink
fix whitespace
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@21494 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jan 29, 2019
1 parent ed801be commit 11ce157
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/xpra/server/websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ def __init__(self, socket, local, remote, target, socktype, ws_handler):
SocketConnection.__init__(self, socket, local, remote, target, socktype)
self.protocol_type = "websocket"
self.request = ws_handler.request

def close(self):
SocketConnection.close(self)
request = self.request
Expand All @@ -358,7 +358,7 @@ def close(self):
request.close()
except Exception:
log("error closing %s", request, exc_info=True)

def read(self, n):
#FIXME: we should try to honour n
#from websockify.websocket import WebSocketWantReadError, WebSocketWantWriteError
Expand All @@ -380,7 +380,7 @@ def read(self, n):
self.input_bytecount += len(buf)
return buf
return None

def write(self, buf):
#log("write(%i bytes)", len(buf))
from websockify.websocket import WebSocketWantWriteError
Expand All @@ -403,11 +403,11 @@ def __init__(self, socket, local, remote, target, socktype, ws_handler):
self.protocol_type = "websocket"
self.ws_handler = ws_handler
self.pending_read = Queue()

def close(self):
self.pending_read = Queue()
SocketConnection.close(self)

def read(self, n):
#FIXME: we should try to honour n
while self.is_active():
Expand All @@ -428,7 +428,7 @@ def read(self, n):
self.pending_read.put(v)
self.input_bytecount += len(buf)
return buf

def write(self, buf):
self.ws_handler.send_frames((memoryview_to_bytes(buf),))
self.output_bytecount += len(buf)
Expand Down

0 comments on commit 11ce157

Please sign in to comment.