把Tunnel中的错误处理单独用一个函数做

This commit is contained in:
dmy@lab
2016-01-14 22:03:54 +08:00
parent 1e61d0d9eb
commit 97edfb5fff
2 changed files with 37 additions and 34 deletions

View File

@@ -42,7 +42,7 @@ func (this *TunnelStatusManager) unregister(t interface{}) {
this.mux.Lock()
defer this.mux.Unlock()
l := this.tunnelList
log.Debug("%d tunnels before remove.", this.tunnelList.Len())
// log.Debug("%d tunnels before remove.", this.tunnelList.Len())
nl := new(list.List)
for e := l.Front(); e != nil; e = e.Next() {
if e.Value != t {
@@ -51,7 +51,7 @@ func (this *TunnelStatusManager) unregister(t interface{}) {
}
this.tunnelList = nl
log.Debug("%d tunnels after remove.", this.tunnelList.Len())
// log.Debug("%d tunnels after remove.", this.tunnelList.Len())
}