It's a well-known bug in cygwin library (used by rsync on Windows).
Thanks. I worked around the issue setting a timeout of 5 minutes on every state (idle, busy, close, connect...) and doing rsync in a loop. While it's not a perfect solution, it works well enough for me.