Merge "sync: fix timeout = 0 wait behavior"