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:
Jon Escombe
2016-01-06 12:41:57 +00:00
parent 7693a9fc09
commit 133674f329
2 changed files with 9 additions and 4 deletions

View File

@@ -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();
}

View File

@@ -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: