Run method is obsolete

This commit is contained in:
Asim 2016-05-07 03:08:43 +01:00
parent 24220fe615
commit 0d21b08928

View File

@ -18,20 +18,6 @@ func init() {
rand.Seed(time.Now().Unix()) rand.Seed(time.Now().Unix())
} }
func (r *defaultSelector) run() {
t := time.NewTicker(time.Second * 30)
for {
select {
case <-t.C:
// TODO
case <-r.exit:
t.Stop()
return
}
}
}
func (r *defaultSelector) Init(opts ...Option) error { func (r *defaultSelector) Init(opts ...Option) error {
for _, o := range opts { for _, o := range opts {
o(&r.so) o(&r.so)
@ -113,12 +99,9 @@ func newDefaultSelector(opts ...Option) Selector {
sopts.Registry = registry.DefaultRegistry sopts.Registry = registry.DefaultRegistry
} }
se := &defaultSelector{ return &defaultSelector{
so: sopts, so: sopts,
exit: make(chan bool), exit: make(chan bool),
bl: blacklist.New(), bl: blacklist.New(),
} }
go se.run()
return se
} }