relay: reset channel-id to 1 when all channels are idle

This commit is contained in:
Brian Warner 2015-03-02 22:04:58 -08:00
parent 9a11f355ea
commit c9e0246266

View File

@ -124,6 +124,8 @@ class Relay(resource.Resource):
self.channels.pop(channel_id)
log.msg("freed %d, now have %d channels" %
(channel_id, len(self.channels)))
if not self.channels:
self.next_channel = 1
class TransitConnection(protocol.Protocol):
def __init__(self):