This commit is contained in:
crusader 2018-04-13 20:22:50 +09:00
parent 423ec815a2
commit 9f2ff9438c

View File

@ -127,6 +127,7 @@ func (s *ProbeServlets) OnDisconnect(servletCtx server.ServletCtx) {
}
func (s *ProbeServlets) handleSubscribe(serverCtx server.ServerCtx, subscribeChan <-chan *ogs.Message) {
var sessions []*ogrs.Session
LOOP:
for {
@ -138,7 +139,12 @@ LOOP:
switch msg.TargetType {
case ogs.PROBE:
sessions := s.getProbeSessions(msg.Targets)
sessions = s.getProbeSessions(msg.Targets)
default:
logging.Logger().Warnf("Subscriber: Unknown TargetType %s", msg.TargetType)
continue LOOP
}
if nil == sessions || 0 == len(sessions) {
continue LOOP
}
@ -150,7 +156,7 @@ LOOP:
writeChan <- *msg.Message
}
}
}
}
}
}