getlantern/lantern#1937 Limited rate of redialing

I would say it would probably just return one, although in theory it could
consolidate them. I agree probably not worth fiddling with at the moment.

On Mon, Nov 3, 2014 at 2:44 PM, oxtoacart <notifications@github.com> wrote:

> In connpool.go:
>
> > +
> > +			select {
> > +			case p.connCh <- conn:
> > +				p.log.Trace("Fed conn")
> > +			case <-newConnTimedOut.C:
> > +				p.log.Trace("Queued conn timed out, closing")
> > +				err := conn.Close()
> > +				if err != nil {
> > +					p.log.Tracef("Unable to close timed out queued conn: %s", err)
> > +				}
> > +			case wg := <-p.stopCh:
> > +				p.log.Trace("Closing queued conn")
> > +				err := conn.Close()
> > +				if err != nil {
> > +					p.log.Tracef("Unable to close queued conn: %s", err)
> > +				}
>
> Agreed it could be interesting and a nice use for that pattern, but it
> also raises the question of handling multiple errors, since multiple of the
> worker goroutines can fail. Would we return just one of the errors, all
> errors? IMHO not worth messing with at the moment.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/getlantern/connpool/pull/4/files#r19773009>.
>



-- 
--
President
Brave New Software Project, Inc.
https://www.getlantern.org
pgp A998 2B6E EF1C 373E 723F A813 045D A255 901A FD89