Fix crosslink crash on joining channels where TX is active
This commit is contained in:
parent
1bc7c35dc0
commit
116cfe0cc4
|
@ -19,10 +19,15 @@ class FRNClient(BufferingLineReceiver, TimeoutMixin):
|
|||
def connectionMade(self):
|
||||
BufferingLineReceiver.connectionMade(self)
|
||||
self.user.VX = versions.client
|
||||
self.serverdata = {}
|
||||
self.txq = Queue()
|
||||
self.setTimeout(25.0)
|
||||
self.login()
|
||||
|
||||
def connectionLost(self, reason):
|
||||
self.serverdata = {}
|
||||
BufferingLineReceiver.connectionLost(self, reason)
|
||||
|
||||
def ready(self):
|
||||
self.status = 'READY'
|
||||
self.msgbuffer = []
|
||||
|
|
|
@ -78,17 +78,19 @@ class FRNCrosslinkClient(FRNClient):
|
|||
for _, _, _, factory in clients:
|
||||
conn = factory.connection
|
||||
if conn != self:
|
||||
if conn.txOk:
|
||||
conn.txReq = False
|
||||
conn.sendAudioFrame(frames)
|
||||
conn.busyTimer.reset(2.0)
|
||||
else:
|
||||
if not conn.txReq:
|
||||
log.msg("Requesting TX for %s" % conn.user.ON)
|
||||
conn.startTransmission()
|
||||
conn.txReq = True
|
||||
conn.busyTimer = self.reactor.callLater(
|
||||
5.0, conn.goIdle)
|
||||
role = conn.serverdata.get('al', None)
|
||||
if role in ['OK', 'ADMIN', 'OWNER']:
|
||||
if conn.txOk:
|
||||
conn.txReq = False
|
||||
conn.sendAudioFrame(frames)
|
||||
conn.busyTimer.reset(2.0)
|
||||
else:
|
||||
if not conn.txReq:
|
||||
log.msg("Requesting TX for %s" % conn.user.ON)
|
||||
conn.startTransmission()
|
||||
conn.txReq = True
|
||||
conn.busyTimer = self.reactor.callLater(
|
||||
5.0, conn.goIdle)
|
||||
self.pong()
|
||||
|
||||
def loginResponse(self, info):
|
||||
|
|
Loading…
Reference in New Issue