This commit is contained in:
arraykeys@gmail.com
2018-03-13 10:04:18 +08:00
parent 4d4fb64b59
commit ad47104fc7
3 changed files with 5 additions and 2 deletions

View File

@ -138,6 +138,9 @@ func (s *MuxBridge) handler(inConn net.Conn) {
if sess, ok := group.Get(index); ok && sess.(*smux.Session).IsClosed() {
group.Remove(index)
}
if group.IsEmpty() {
s.clientControlConns.Remove(groupKey)
}
break
}
time.Sleep(time.Second * 5)

View File

@ -47,7 +47,7 @@ func (s *MuxClient) Start(args interface{}) (err error) {
s.cfg = args.(MuxClientArgs)
s.CheckArgs()
s.InitService()
log.Printf("%s client on %s", *s.cfg.ParentType, *s.cfg.Parent)
log.Printf("client started")
count := 1
if *s.cfg.SessionCount > 0 {
count = *s.cfg.SessionCount

View File

@ -205,7 +205,7 @@ func (s *MuxServer) Start(args interface{}) (err error) {
if err != nil {
return
}
log.Printf("%s server on %s", *s.cfg.ParentType, (*s.sc.Listener).Addr())
log.Printf("server on %s", (*s.sc.Listener).Addr())
}
return
}