mozilla-services/pushgo — pull request #153 by kitcambridge (2014-12-12 21:32:30+00:00)
Title: Fix persistent connection handling in the router

Let's merge this after @bbangert's router refactor...

* Expose `IdleConns` as a config setting for `Router` and `GCMPing`.
* Ensure `Router.notifyContact()` discards the response body. If the body is closed but not consumed, the underlying TCP connection will not be reused. Other uses of `http.Client` do this already.
* Replace `SetDeadline` with `http.Client.Timeout`. `SetDeadline` caused persistent connections to expire after `Router.rwtimeout`, forcing the client to open new ones.
* Add metrics for socket connects and disconnects.
* Add a basic routing test.

@bbangert r?