ing
This commit is contained in:
parent
5f0c3e9fc6
commit
7d2c9c4328
|
@ -73,7 +73,7 @@ func (d *ofDiscoverer) DiscoverStop(requesterID string, requestID string) {
|
||||||
if !ok {
|
if !ok {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
s.(session.DiscoverySession).DiscoveryRequest().(*ofDiscoveryRequest).canceled.Store(true)
|
|
||||||
s.(session.DiscoverySession).Shutdown()
|
s.(session.DiscoverySession).Shutdown()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,9 +167,10 @@ LOOP:
|
||||||
d.processingSessions.Store(req.RequestID(), s)
|
d.processingSessions.Store(req.RequestID(), s)
|
||||||
d.discover(req, s)
|
d.discover(req, s)
|
||||||
select {
|
select {
|
||||||
case <-time.After(time.Second * 1):
|
case <-time.After(time.Millisecond * 500):
|
||||||
}
|
}
|
||||||
d.SendMessage(req, types.DiscoveryMessageTypeStop, omu.Now())
|
d.SendMessage(req, types.DiscoveryMessageTypeStop, omu.Now())
|
||||||
|
s.DiscoveryRequest().(*ofDiscoveryRequest).canceled.Store(true)
|
||||||
|
|
||||||
if _, ok := d.processingSessions.Load(req.RequestID()); ok {
|
if _, ok := d.processingSessions.Load(req.RequestID()); ok {
|
||||||
d.processingSessions.Delete(req.RequestID())
|
d.processingSessions.Delete(req.RequestID())
|
||||||
|
|
Loading…
Reference in New Issue
Block a user