fix bug in sync read when timeout occurs