tiny refactoring.
This commit is contained in:
@@ -638,12 +638,13 @@ class WebSocket(object):
|
|||||||
|
|
||||||
while True:
|
while True:
|
||||||
line = self._recv_line()
|
line = self._recv_line()
|
||||||
line = line.decode('utf-8')
|
line = line.decode('utf-8').strip()
|
||||||
if line == "\r\n" or line == "\n":
|
if not line:
|
||||||
break
|
break
|
||||||
line = line.strip()
|
|
||||||
if traceEnabled:
|
if traceEnabled:
|
||||||
logger.debug(line)
|
logger.debug(line)
|
||||||
|
|
||||||
if not status:
|
if not status:
|
||||||
status_info = line.split(" ", 2)
|
status_info = line.split(" ", 2)
|
||||||
status = int(status_info[1])
|
status = int(status_info[1])
|
||||||
|
Reference in New Issue
Block a user