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):
|
def connectionMade(self):
|
||||||
BufferingLineReceiver.connectionMade(self)
|
BufferingLineReceiver.connectionMade(self)
|
||||||
self.user.VX = versions.client
|
self.user.VX = versions.client
|
||||||
|
self.serverdata = {}
|
||||||
self.txq = Queue()
|
self.txq = Queue()
|
||||||
self.setTimeout(25.0)
|
self.setTimeout(25.0)
|
||||||
self.login()
|
self.login()
|
||||||
|
|
||||||
|
def connectionLost(self, reason):
|
||||||
|
self.serverdata = {}
|
||||||
|
BufferingLineReceiver.connectionLost(self, reason)
|
||||||
|
|
||||||
def ready(self):
|
def ready(self):
|
||||||
self.status = 'READY'
|
self.status = 'READY'
|
||||||
self.msgbuffer = []
|
self.msgbuffer = []
|
||||||
|
|
|
@ -78,17 +78,19 @@ class FRNCrosslinkClient(FRNClient):
|
||||||
for _, _, _, factory in clients:
|
for _, _, _, factory in clients:
|
||||||
conn = factory.connection
|
conn = factory.connection
|
||||||
if conn != self:
|
if conn != self:
|
||||||
if conn.txOk:
|
role = conn.serverdata.get('al', None)
|
||||||
conn.txReq = False
|
if role in ['OK', 'ADMIN', 'OWNER']:
|
||||||
conn.sendAudioFrame(frames)
|
if conn.txOk:
|
||||||
conn.busyTimer.reset(2.0)
|
conn.txReq = False
|
||||||
else:
|
conn.sendAudioFrame(frames)
|
||||||
if not conn.txReq:
|
conn.busyTimer.reset(2.0)
|
||||||
log.msg("Requesting TX for %s" % conn.user.ON)
|
else:
|
||||||
conn.startTransmission()
|
if not conn.txReq:
|
||||||
conn.txReq = True
|
log.msg("Requesting TX for %s" % conn.user.ON)
|
||||||
conn.busyTimer = self.reactor.callLater(
|
conn.startTransmission()
|
||||||
5.0, conn.goIdle)
|
conn.txReq = True
|
||||||
|
conn.busyTimer = self.reactor.callLater(
|
||||||
|
5.0, conn.goIdle)
|
||||||
self.pong()
|
self.pong()
|
||||||
|
|
||||||
def loginResponse(self, info):
|
def loginResponse(self, info):
|
||||||
|
|
Loading…
Reference in New Issue