Update _core.py

Was recving the close frame from the websocket
This commit is contained in:
jamesmilliman
2014-08-29 10:48:53 -04:00
parent dd32067a41
commit d71e3133b5

View File

@@ -663,7 +663,10 @@ class WebSocket(object):
opcode, data = self.recv_data()
if six.PY3 and opcode == ABNF.OPCODE_TEXT:
return data.decode("utf-8")
return data
elif opcode == ABNF.OPCODE_TEXT or opcode == ABNF.OPCODE_BINARY:
return data
else:
return ''
def recv_data(self, control_frame=False):
"""