[go: nahoru, domu]

Skip to content

Commit

Permalink
of_01: Ensure task is only started once
Browse files Browse the repository at this point in the history
  • Loading branch information
MurphyMc committed Oct 14, 2013
1 parent 814a3c8 commit bab636b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pox/openflow/of_01.py
Original file line number Diff line number Diff line change
Expand Up @@ -835,12 +835,19 @@ def __init__ (self, port = 6633, address = '0.0.0.0'):
Task.__init__(self)
self.port = int(port)
self.address = address
self.started = False

core.addListener(pox.core.GoingUpEvent, self._handle_GoingUpEvent)

def _handle_GoingUpEvent (self, event):
self.start()

def start (self):
if self.started:
return
self.started = True
return super(OpenFlow_01_Task,self).start()

def run (self):
# List of open sockets/connections to select on
sockets = []
Expand Down

0 comments on commit bab636b

Please sign in to comment.