[go: nahoru, domu]

Skip to content

Commit

Permalink
Pull from websockify. Fix close code.
Browse files Browse the repository at this point in the history
  • Loading branch information
kanaka committed May 11, 2012
1 parent bc28395 commit 53dfab7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions utils/websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def decode_hybi(buf, base64=False):

if f['opcode'] == 0x08:
if f['length'] >= 2:
f['close_code'] = unpack_from(">H", f['payload'])
f['close_code'] = unpack_from(">H", f['payload'])[0]
if f['length'] > 3:
f['close_reason'] = f['payload'][2:]

Expand Down Expand Up @@ -769,8 +769,6 @@ def top_new_client(self, startsock, address):
# Close the client
_, exc, _ = sys.exc_info()
if self.client:
print exc
print repr(exc.args)
self.send_close(exc.args[0], exc.args[1])
except self.EClose:
_, exc, _ = sys.exc_info()
Expand Down

0 comments on commit 53dfab7

Please sign in to comment.