Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClientID not updated for known clients at CONNECT #264

Open
dapeda42 opened this issue Sep 14, 2022 · 0 comments
Open

ClientID not updated for known clients at CONNECT #264

dapeda42 opened this issue Sep 14, 2022 · 0 comments

Comments

@dapeda42
Copy link

If a client connects the first time at the MQTT-SN gateway, its client ID from the CONNECT message is stored (see ClientList::createClient).
However, if the client disconnects and connects again with a different client ID, this new client ID is ignored but the client ID from the first CONNECT message is used.
Proposal would be to update the client ID from the CONNECT message for known clients.
E.g., MQTTSNGateway/src/MQTTSNGWClientRecvTask.cpp, lines 168:
if( packet->getType() == MQTTSN_CONNECT ) {
MQTTSNPacket_connectData data;
if (packet->getCONNECT(&data) != 0) {
client->setClientId( data.clientID );
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant