Another silly bug.

This commit is contained in:
Jonathan Naylor 2016-10-13 21:18:48 +01:00
parent b59901a746
commit 5e71e9c0d9

View File

@ -275,15 +275,16 @@ void CP25Gateway::run()
if (dstId == 9999U || reflector != NULL) {
std::string callsign = lookup->find(srcId);
LogMessage("Unlinked from reflector %u by %s", currentId, callsign.c_str());
currentId = dstId;
if (remoteNetwork != NULL) {
if (remoteNetwork != NULL && currentId != 9999U) {
remoteNetwork->writeUnlink(currentAddr, currentPort);
remoteNetwork->writeUnlink(currentAddr, currentPort);
remoteNetwork->writeUnlink(currentAddr, currentPort);
pollTimer.stop();
lostTimer.stop();
}
currentId = dstId;
}
// Link to the new reflector