fix lost data when reader gets a writting timeout