ing
This commit is contained in:
parent
32d1d7f100
commit
502ff3ef89
|
@ -135,17 +135,17 @@ LOOP:
|
||||||
s := session.RetainDiscoverySession()
|
s := session.RetainDiscoverySession()
|
||||||
d.discover(req, s)
|
d.discover(req, s)
|
||||||
select {
|
select {
|
||||||
case <-time.After(time.Millisecond * 500):
|
case <-time.After(time.Second * 1):
|
||||||
}
|
}
|
||||||
d.SendMessage(req, types.DiscoveryMessageTypeStop, omu.Now(), nil)
|
d.SendMessage(req, types.DiscoveryMessageTypeStop, omu.Now(), nil)
|
||||||
|
|
||||||
|
select {
|
||||||
|
case <-time.After(time.Millisecond * 500):
|
||||||
|
}
|
||||||
|
|
||||||
session.ReleaseDiscoverySession(s)
|
session.ReleaseDiscoverySession(s)
|
||||||
req.(*ofDiscoveryRequest).release()
|
req.(*ofDiscoveryRequest).release()
|
||||||
|
|
||||||
select {
|
|
||||||
case <-time.After(time.Second * 2):
|
|
||||||
}
|
|
||||||
|
|
||||||
log.Print("Discovery Session complete")
|
log.Print("Discovery Session complete")
|
||||||
case <-d.stopChan:
|
case <-d.stopChan:
|
||||||
return
|
return
|
||||||
|
|
|
@ -10,6 +10,7 @@ import (
|
||||||
oa "git.loafle.net/overflow/annotation-go"
|
oa "git.loafle.net/overflow/annotation-go"
|
||||||
od "git.loafle.net/overflow/di-go"
|
od "git.loafle.net/overflow/di-go"
|
||||||
omd "git.loafle.net/overflow/model/discovery"
|
omd "git.loafle.net/overflow/model/discovery"
|
||||||
|
orp "git.loafle.net/overflow/rpc-go/protocol"
|
||||||
"git.loafle.net/overflow_scanner/probe/discovery"
|
"git.loafle.net/overflow_scanner/probe/discovery"
|
||||||
"git.loafle.net/overflow_scanner/probe/discovery/types"
|
"git.loafle.net/overflow_scanner/probe/discovery/types"
|
||||||
)
|
)
|
||||||
|
@ -96,8 +97,8 @@ func (s *DiscoveryService) InitService() {
|
||||||
s.PubSub.Pub(
|
s.PubSub.Pub(
|
||||||
rpc.MakeRPCMessage(
|
rpc.MakeRPCMessage(
|
||||||
[]string{request.RequesterID()},
|
[]string{request.RequesterID()},
|
||||||
"DiscoveryService.Error",
|
"DiscoveryService.DiscoveryError",
|
||||||
[]interface{}{err},
|
[]interface{}{&orp.Error{Code: orp.E_INTERNAL, Message: err.Error()}},
|
||||||
),
|
),
|
||||||
"/scanner",
|
"/scanner",
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user