Skip to content

Commit

Permalink
Update agent.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sambabug committed Oct 1, 2019
1 parent 664c4d7 commit 1d131d9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion applications/iiit/VolttronBridge/volttronbridge/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,9 @@ def onNewEnergyDemand(self, peer, sender, bus, topic, headers, message):

#check for upstream connection, if not retry once
_log.debug('check us connection...')
if not self._usConnected:
#ping us to confirm
ping_success = self.do_rpc(url_root, 'rpc_ping')
if ping_success and not self._usConnected:
_log.debug('not connected, Trying to register once...')
self._usConnected = self._registerToUsBridge(url_root,\
self._discovery_address,\
Expand Down

0 comments on commit 1d131d9

Please sign in to comment.