Commits

dgquintas  committed bb9de93

fixed overly eager startup of the beacon sending loop. Gotta wait till connected.

  • Participants
  • Parent commits e3bcace

Comments (0)

Files changed (1)

File vm/boincvm_vm/stomp/VMStompEngine.py

     networkInterface = config.get('VM', 'network_interface')
     period = int(config.get('VM', 'beacon_interval'))
 
+    self._startSendingBeacons = lambda: LoopingCall( self._sendBeacon ).start(period, now=False)
+
     self._initId(networkInterface)
 
-    self._beaconSender = LoopingCall( self._sendBeacon ) 
-    self._beaconSender.start(period, now=False)
 
   def connected(self, msg):
     res = []
 
     #announce ourselves
     res.append( words.HELLO().howToSay(self) )
+ 
+    #FIXME: even better whould be to wait for the HELLO back from the host
+    self._startSendingBeacons()
 
     return tuple(res)