Skip to content

Commit

Permalink
Protected pubfreq mechanics if streams left unconfigured.
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhunter2 committed Jan 7, 2013
1 parent a0ed266 commit d670b75
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ion/agents/instrument/instrument_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -837,11 +837,12 @@ def _async_driver_event_sample(self, val, ts):
log.error('Instrument agent %s received sample with bad \
stream name %s.', self._proc_name, stream_name)

state = self._fsm.get_current_state()
pubfreq = self.aparam_pubfreq[stream_name]
else:
state = self._fsm.get_current_state()
pubfreq = self.aparam_pubfreq[stream_name]

if state != ResourceAgentState.STREAMING or pubfreq == 0:
self._publish_stream_buffer(stream_name)
if state != ResourceAgentState.STREAMING or pubfreq == 0:
self._publish_stream_buffer(stream_name)

def _publish_stream_buffer(self, stream_name):
"""
Expand Down

0 comments on commit d670b75

Please sign in to comment.