mirror of
https://github.com/naruxde/revpimodio2.git
synced 2026-09-30 23:04:29 +02:00
Bugfix: writeprocimg did not flush buffer on network error
This commit is contained in:
1 parent
c20caaa5d5
commit
990647a160
1 file changed
+12
-8
+12
-8
@@ -336,14 +336,18 @@ class NetFH(Thread):
|
||||
|
||||
with self.__socklock:
|
||||
# b CM ii ii 00000000 b = 16
|
||||
self._slavesock.sendall(pack(
|
||||
"=c2sHH8xc",
|
||||
HEADER_START, b'FD', self.__int_buff, len(self.__by_buff), HEADER_STOP
|
||||
) + self.__by_buff)
|
||||
|
||||
# Puffer immer leeren
|
||||
self.__int_buff = 0
|
||||
self.__by_buff.clear()
|
||||
try:
|
||||
self._slavesock.sendall(pack(
|
||||
"=c2sHH8xc",
|
||||
HEADER_START, b'FD', self.__int_buff, len(self.__by_buff), HEADER_STOP
|
||||
) + self.__by_buff)
|
||||
except Exception:
|
||||
self.__flusherr = True
|
||||
raise
|
||||
finally:
|
||||
# Puffer immer leeren
|
||||
self.__int_buff = 0
|
||||
self.__by_buff.clear()
|
||||
|
||||
# Rückmeldebyte auswerten
|
||||
blockok = self._slavesock.recv(1)
|
||||
|
||||
Reference in new issue
Block a user