relay: reset channel-id to 1 when all channels are idle
This commit is contained in:
parent
9a11f355ea
commit
c9e0246266
|
@ -124,6 +124,8 @@ class Relay(resource.Resource):
|
||||||
self.channels.pop(channel_id)
|
self.channels.pop(channel_id)
|
||||||
log.msg("freed %d, now have %d channels" %
|
log.msg("freed %d, now have %d channels" %
|
||||||
(channel_id, len(self.channels)))
|
(channel_id, len(self.channels)))
|
||||||
|
if not self.channels:
|
||||||
|
self.next_channel = 1
|
||||||
|
|
||||||
class TransitConnection(protocol.Protocol):
|
class TransitConnection(protocol.Protocol):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user