mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-04-15 05:32:21 +00:00
Master (remote control) channel fixes
Moved the signal to stop the timer from AttemptTransition() to Close(), as was not reliably reached. Also disconnect the timer event slot on close, to avoid multiple calls on subsequent sessions.
This commit is contained in:
@@ -842,6 +842,10 @@ ANT::slotStopBroadcastTimer(int channel) // timer
|
||||
|
||||
//qDebug()<<"ANT::slotStopTimer req from channel "<<channel;
|
||||
|
||||
// disconnect the slot, else we duplicate signals on subsequent sessions
|
||||
disconnect(antChannel[channel]->channelTimer, SIGNAL(timeout()), this, SLOT(slotControlTimerEvent()));
|
||||
|
||||
|
||||
// stop the broadcast timer..
|
||||
antChannel[channel]->channelTimer->stop();
|
||||
}
|
||||
|
||||
@@ -121,6 +121,11 @@ void ANTChannel::close()
|
||||
emit lostInfo(number);
|
||||
lastMessage = ANTMessage();
|
||||
|
||||
if (is_master) {
|
||||
//qDebug()<<number<<"Stopping timer..";
|
||||
emit broadcastTimerStop(number);
|
||||
}
|
||||
|
||||
// lets shutdown
|
||||
qDebug()<<"** CLOSING CHANNEL"<<number<<"**";
|
||||
status = Closing;
|
||||
@@ -1059,10 +1064,6 @@ void ANTChannel::attemptTransition(int message_id)
|
||||
//qDebug()<<number<<"TRANSITION from closed";
|
||||
status = Closed;
|
||||
//qDebug()<<"** CHANNEL"<<number<<"NOW CLOSED **";
|
||||
if (is_master) {
|
||||
//qDebug()<<number<<"Stopping timer..";
|
||||
emit broadcastTimerStop(number);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user