summaryrefslogtreecommitdiff
path: root/websocket
diff options
context:
space:
mode:
Diffstat (limited to 'websocket')
-rw-r--r--websocket/_core.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/websocket/_core.py b/websocket/_core.py
index f832cad..a3e484b 100644
--- a/websocket/_core.py
+++ b/websocket/_core.py
@@ -478,7 +478,9 @@ class WebSocket(object):
continue
if isEnabledForError():
recv_status = struct.unpack("!H", frame.data[0:2])[0]
- if recv_status != STATUS_NORMAL:
+ if recv_status >= 3000 and recv_status <= 4999:
+ debug("close status: " + repr(recv_status))
+ elif recv_status != STATUS_NORMAL:
error("close status: " + repr(recv_status))
break
except: