daemon: Ignore redundant session state changes.
This commit is contained in:
parent
37c39a69e5
commit
b2e1835d60
1 changed files with 3 additions and 0 deletions
|
@ -74,6 +74,7 @@ class Session(object):
|
||||||
self._confobjslock = threading.Lock()
|
self._confobjslock = threading.Lock()
|
||||||
self._handlers = set()
|
self._handlers = set()
|
||||||
self._handlerslock = threading.Lock()
|
self._handlerslock = threading.Lock()
|
||||||
|
self._state = None
|
||||||
self._hooks = {}
|
self._hooks = {}
|
||||||
self.setstate(state=coreapi.CORE_EVENT_DEFINITION_STATE,
|
self.setstate(state=coreapi.CORE_EVENT_DEFINITION_STATE,
|
||||||
info=False, sendevent=False)
|
info=False, sendevent=False)
|
||||||
|
@ -221,6 +222,8 @@ class Session(object):
|
||||||
true, generate a CORE API Event Message and send to the connected
|
true, generate a CORE API Event Message and send to the connected
|
||||||
entity.
|
entity.
|
||||||
'''
|
'''
|
||||||
|
if state == self._state:
|
||||||
|
return []
|
||||||
self._time = time.time()
|
self._time = time.time()
|
||||||
self._state = state
|
self._state = state
|
||||||
replies = []
|
replies = []
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue