Fix yet another bug with node IDs

* Pick appropriate slot
* Log nodeId vs clientId/etc. for less confusion
This commit is contained in:
Bryan Ashby 2020-05-13 19:30:57 -06:00
parent 714f32f695
commit fd6bb47427
No known key found for this signature in database
GPG key ID: B49EB437951D2542
5 changed files with 22 additions and 21 deletions

View file

@ -81,9 +81,9 @@ function userLogin(client, username, password, options, cb) {
if(existingClientConnection) {
client.log.info(
{
existingClientId : existingClientConnection.session.id,
username : user.username,
userId : user.userId
existingNodeId : existingClientConnection.node,
username : user.username,
userId : user.userId
},
'Already logged in'
);
@ -97,11 +97,12 @@ function userLogin(client, username, password, options, cb) {
// update client logger with addition of username
client.log = logger.log.child(
{
clientId : client.log.fields.clientId,
nodeId : client.log.fields.nodeId,
sessionId : client.log.fields.sessionId,
username : user.username,
}
);
client.log.info('Successful login');
// User's unique session identifier is the same as the connection itself