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