mirror of
https://github.com/naruxde/revpimodio2.git
synced 2026-09-30 23:04:29 +02:00
Bugfix: Wrong buffer size after network error
This commit is contained in:
1 parent
5a0d88efe1
commit
c20caaa5d5
2 files changed
+3
-1
No files matched your search
@@ -492,6 +492,8 @@ class NetFH(Thread):
|
|||||||
min(length, self.__buff_size),
|
min(length, self.__buff_size),
|
||||||
)
|
)
|
||||||
if count == 0:
|
if count == 0:
|
||||||
|
# Add missing bytes with zero to restore original size
|
||||||
|
buffer += bytearray(length)
|
||||||
self.__sockerr.set()
|
self.__sockerr.set()
|
||||||
raise IOError("read error on network")
|
raise IOError("read error on network")
|
||||||
buffer += self.__buff_block[:count]
|
buffer += self.__buff_block[:count]
|
||||||
|
|||||||
Reference in new issue
Block a user