aboutsummaryrefslogtreecommitdiff
path: root/src/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/misc.c')
-rw-r--r--src/misc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/misc.c b/src/misc.c
index c2803a6..0bf7233 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -47,8 +47,10 @@ int try_write(int _fd, char *_buff, int _size, int _retry)
if(ret < 0)
return 1;
- else
+ else {
written += ret;
+ cntr = 0; //reset fail counter
+ }
if(++cntr > _retry)
return 1;