save cruft

This commit is contained in:
Asim Aslam
2019-12-12 12:27:46 +00:00
parent 27af221fd2
commit e260cc4a24
3 changed files with 255 additions and 149 deletions

View File

@@ -2,7 +2,6 @@ package tunnel
import (
"io"
"time"
"github.com/micro/go-micro/util/log"
)
@@ -24,24 +23,6 @@ type tunListener struct {
delFunc func()
}
// periodically announce self the channel being listened on
func (t *tunListener) announce() {
tick := time.NewTicker(time.Second * 30)
defer tick.Stop()
// first announcement
t.session.Announce()
for {
select {
case <-tick.C:
t.session.Announce()
case <-t.closed:
return
}
}
}
func (t *tunListener) process() {
// our connection map for session
conns := make(map[string]*session)