fix a read timeout bug on Windows