0
我用Feedjira解析RSS流。 當我使用fetch_and_parse
方法時,它有時會被阻塞並且不會響應。路邊沒有迴應
同樣的事情發生在手動遏制下載。
我寫在一個循環:
@my_logger.info "--- Before perform ---"
easy = Curl::Easy.new
easy.follow_location = true
easy.max_redirects = 3
easy.connect_timeout = 120
easy.url = url
easy.useragent = "Ruby/Curb"
easy.perform
@my_logger.info "--- After perform ---"
doc = easy.body_str
easy.close
一段時間之後(也可能是一天或一小時),過程停止在easy.perform
線和不響應。例如。過程輸出--- Before perform ---
,沒有別的。