New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ParseURL should have reasonable timeout #83
Comments
set your desired timeout on the parser's client: fp := gofeed.NewParser()
fp.Client = &http.Client{ Timeout: time.Second*10 }
feed, _ := fp.ParseURL("http://feeds.twit.tv/twit.xml")
fmt.Println(feed.Title) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected behavior
If the connection to the given url is hanging, the httpClient should timeout.
Ideally the desired timeout could be an argument with a reasonable default
Actual behavior
the connection hangs
Steps to reproduce the behavior
find a url with really slow network and try parsing it.
Note: Please include any links to problem feeds, or the feed content itself!
the link that hung for me was http://rss.shanghaidaily.com/Portal/mainSite/Handler.ashx?i=7
the function that's hanging for me is ParseURL in parser.go
The text was updated successfully, but these errors were encountered: