- fixed the "write exception" error. I was resetting got_select at the
[rsync/rsync.git] / io.c
diff --git a/io.c b/io.c
index dbe2100..563dacf 100644 (file)
--- a/io.c
+++ b/io.c
@@ -256,6 +256,9 @@ static int writefd(int fd,char *buf,int len)
            exit_cleanup(1);
     }
 
+    got_select = 0;
+
+
     if (ret == -1) {
       read_check(buffer_f_in);
 
@@ -269,8 +272,6 @@ static int writefd(int fd,char *buf,int len)
                      fd_count = buffer_f_in+1;
       }
 
-      got_select = 0;
-
       tv.tv_sec = BLOCKING_TIMEOUT;
       tv.tv_usec = 0;
       count = select(fd_count,buffer_f_in == -1? NULL: &r_fds,