Skip to content

Commit

Permalink
Timeout check killing Tornado ioloop
Browse files Browse the repository at this point in the history
  • Loading branch information
hoffmabc committed Jun 2, 2015
1 parent a3453da commit cc16621
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions rudp/pendingpacket.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,8 @@ def send(self):

self._sending = True

def packet_send(counter):

def packet_lost():
if self._sending:
self.log.info('Packet %s Lost', self._packet.get_sequence_number())

if self._sending and counter < 2:
self.log.debug('Sending Packet #%s: %s', self._packet.get_sequence_number(), self._sending)
self._packet_sender.send(self._packet)
packet_send(counter+1)
else:
self.loop.call_later(5, packet_lost)

packet_send(0)
self.log.debug('Sending Packet #%s: %s', self._packet.get_sequence_number(), self._sending)
self._packet_sender.send(self._packet)

# self._interval_id = rudp.helpers.set_interval(
# packet_send,
Expand Down

0 comments on commit cc16621

Please sign in to comment.