Hacker News new | ask | show | jobs
by problemdomain 5016 days ago
This annoyed me when dealing with net/http the other day. Really seems like the Go team hasn't spent much time thinking about problems on the client side of connections yet.
1 comments

This isn't true. First net and net/http are great. Second, there are examples all over the ML (even within the last three days) that shows how to create an http client with a timeout-able Dial() function.
james4k just posted a link to the source where the comment by Brad Fitzpatrick actually says it's broken in the manner under discussion.

        // TODO(bradfitz): the timeout should be pushed down into the
        // net package's event loop, so on timeout to dead hosts we
        // don't have a goroutine sticking around for the default of
        // ~3 minutes.