Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion example/mocking_data_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def recv(self, size):
current_bytes = self.remaining_bytes[:size]
self.remaining_bytes = self.remaining_bytes[size:]

if self.remaining_bytes == b'':
if self.remaining_bytes is b'':
self.frame = None
self.remaining_bytes = None

Expand Down
4 changes: 2 additions & 2 deletions ws4py/websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ def process(self, bytes):
self.reading_buffer_size = s.parser.send(bytes) or DEFAULT_READING_SIZE

if s.closing is not None:
logger.debug("Closing message received (%d): %s" % (s.closing.code, s.closing.reason.decode() if isinstance(s.closing.reason, bytes) else s.closing.reason))
logger.debug("Closing message received (%d) '%s'" % (s.closing.code, s.closing.reason))
if not self.server_terminated:
self.close(s.closing.code, s.closing.reason)
else:
Expand All @@ -471,7 +471,7 @@ def process(self, bytes):

if s.errors:
for error in s.errors:
logger.debug("Error message received (%d): %s" % (error.code, error.reason.decode() if isinstance(error.reason, bytes) else error.reason))
logger.debug("Error message received (%d) '%s'" % (error.code, error.reason))
self.close(error.code, error.reason)
s.errors = []
return False
Expand Down
Loading