Skip to content

Commit

Permalink
conference wait
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-plivo committed Mar 20, 2013
1 parent 8d1fe1d commit f5a6421
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/plivo/rest/freeswitch/elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,11 +559,13 @@ def execute(self, outbound_socket):

# wait conference ending for this member
outbound_socket.log.debug("Conference: Room %s, waiting end ..." % self.room)
while outbound_socket.ready():
event = outbound_socket.wait_for_action()
for x in range(10000):

This comment has been minimized.

Copy link
@anemitz

anemitz Mar 29, 2013

Why 10000?

This comment has been minimized.

Copy link
@mike-plivo

mike-plivo Mar 30, 2013

Author Member

I could have keep ready() in this case .
But I never use a while True in a greenlet to avoid any dead infinite loop .

event = outbound_socket.wait_for_action(timeout=30, raise_on_hangup=True)
if event['Action'] == 'floor-change':
self._notify_floor_holder(outbound_socket)
continue
if event.is_empty():
continue
break

# unset digit realm
Expand Down

0 comments on commit f5a6421

Please sign in to comment.