Skip to content
Merged
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
6 changes: 5 additions & 1 deletion pyhap/hap_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,8 @@ def recv(self, buflen=1042, flags=0):
self.LENGTH_LENGTH, socket.MSG_WAITALL
)
if not block_length_bytes:
return result
# Connection likely dropped
return b""
# Init. info about the block we just started.
# Note we are setting the total length to block_length + mac length
self.curr_in_total = \
Expand Down Expand Up @@ -778,6 +779,9 @@ def recv(self, buflen=1042, flags=0):
self.in_count += 1
self.curr_in_block = None
break
elif not actual_len:
# Connection likely dropped
return b""

return result

Expand Down